for example, I have:
double foo = 0.0;
double bar = 0.0;
and I want to write some sort of search to find each variable and change it to:
double Foo = 0.0;
double Bar = 0.0;
I dont want to do these one variable at a time (e.g. :%s/foo/Foo/g) but rather all at once, something close to
:%s/ double \(\w\+\)/ double \1/c
(and somehow capitialize the first character of \1)
Couldn't get the other's to work, this works for me:
or sume-such.
Use the
\u
prefix for the match in the replace clause:For one at a time:
For all at once:
If you want to make the whole match uppercase use the
\U
and\E
delimiters:Use \u