On 2014-01-15 21:19, Christian Brabandt wrote:
> Hi Tim!
>
> On Mi, 15 Jan 2014, Tim Chase wrote:
>
> > On 2014-01-15 15:29, Paul Isambert wrote:
> > > g/\a*\(\l\u\|\u\l\)\a*/call setline(line('$')+1,
> > > matchstr(getline('.'), '\a*\(\l\u\|\u\l\)\a*'))
> >
> >
> > Riffing off Paul's solut
Hi Tim!
On Mi, 15 Jan 2014, Tim Chase wrote:
> On 2014-01-15 15:29, Paul Isambert wrote:
> > g/\a*\(\l\u\|\u\l\)\a*/call setline(line('$')+1,
> > matchstr(getline('.'), '\a*\(\l\u\|\u\l\)\a*'))
>
>
> Riffing off Paul's solution, I'd suggest
>
> :g/\<\w*\l\u\w*\>/call setline(line('$')+1,
2014-01-15 20:50, Tim Chase skrev:
On 2014-01-15 15:29, Paul Isambert wrote:
g/\a*\(\l\u\|\u\l\)\a*/call setline(line('$')+1,
matchstr(getline('.'), '\a*\(\l\u\|\u\l\)\a*'))
Riffing off Paul's solution, I'd suggest
:g/\<\w*\l\u\w*\>/call setline(line('$')+1, matchstr(getline('.'), @/)
On 2014-01-15 15:29, Paul Isambert wrote:
> g/\a*\(\l\u\|\u\l\)\a*/call setline(line('$')+1,
> matchstr(getline('.'), '\a*\(\l\u\|\u\l\)\a*'))
Riffing off Paul's solution, I'd suggest
:g/\<\w*\l\u\w*\>/call setline(line('$')+1, matchstr(getline('.'), @/))
which removes the need to specify
2014-01-15 15:42, Paul Isambert skrev:
- I've replaced \l\u with \(\l\u\|\u\l\), otherwise words starting
with an uppercase letter won't be found.
Why so? Doesn't the \a* take care of it?
No, there no way for '\a*\l\u\a*' to match on e.g. "Initial": if the first \a
matches, then there is not
> > - I've replaced \l\u with \(\l\u\|\u\l\), otherwise words starting
> > with an uppercase letter won't be found.
>
> Why so? Doesn't the \a* take care of it?
No, there no way for '\a*\l\u\a*' to match on e.g. "Initial": if the first \a
matches, then there is nothing left for \u; if that \a do
2014-01-15 15:29, Paul Isambert skrev:
"BPJ" :
Is there any way when using :g to copy the matched substring only?
I want to find all lines with CamelCase words and copy those
words to the bottom of the buffer.
:g/\a*\l\U\a*/t$
copies the whole line, but I want to get the part of the lin
"BPJ" :
> Is there any way when using :g to copy the matched substring only?
>
> I want to find all lines with CamelCase words and copy those
> words to the bottom of the buffer.
>
> :g/\a*\l\U\a*/t$
>
> copies the whole line, but I want to get the part of the line
> matching the pattern.
Is there any way when using :g to copy the matched substring only?
I want to find all lines with CamelCase words and copy those
words to the bottom of the buffer.
:g/\a*\l\U\a*/t$
copies the whole line, but I want to get the part of the line
matching the pattern.
TIA,
/bpj
--
--
You rece