On Feb 15, 2013 9:24 AM, "Bram Moolenaar" <[email protected]> wrote:
>
>
>
> James McCoy wrote:
>
> > > > The other day in #vim, someone was wondering why :s/SOMEWORD/\L\u&/
> > > > was resulting in sOMEWORD instead of title-case (Someword).
> > > >
> > > > That seemed like a reasonable expectation and is how PCRE would
treat
> > > > that substitution, so I came up with the attached patch to make Vim
work
> > > > like that.  Also included are tests.
> > >
> > > Thanks, sounds like a good solution.  Implementation is fairly simple.
> > >
> > > Can you also write an update for the documentation?
> >
> > That's the other part I forgot to mention.  The documentation already
> > describes the behavior I implemented.
>
> Where?  I cannot find a match for \L\u in the documentation.

The s/\L topic states

  following characters made uppercase, until \E

and s/\u states

  next character made uppercase

so a \u should only affect the character after it, not terminate the
existing \L effect.  Were you looking for this specific example to be
documented?

James

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui