Wednesday, January 15, 2014

Re: Copy the matched substring only with :g

> > - 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 doesn't match, then the
first letter must match \l, and that won't work either.

By the way, what I've sent you will only copy the first match of each line. If
you wanted all camelcased words to be copied, it'll need further work.

Best,
Paul

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: