Saturday, April 30, 2011

Re: is there s 'toinitialupper' function?

On Apr 29, 4:47 pm, "John Beckett" <johnb.beck...@gmail.com> wrote:
> Tim Chase wrote:
> >   let s=substitute(s, '\w\+', '\u\1', 'g')
>
> The above is intended to change each word in s, making the first
> letter uppercase and not changing the rest.
>
> The search pattern needs brackets, or the \1 should be replaced.
> The following works:
>
>   let s=substitute(s, '\w\+', '\u&', 'g')

How would I pass the visual selection to a function with this
substitute?

-Bill

--
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

No comments: