I often run into a situation where I have a file with a lot of mixed case. For example,
CamelCase and camelCase
I'm looking for a Vim regular expression replacement to produce,
AnotherCase and anotherCase
Right now I do this in two steps after visually selecting the lines,
:s/CamelCase/AnotherCase/g
:s/camelCase/anotherCase/g
Is this possible in one replacement step, or should I look into other options like a function in .vimrc?
:%S/CamelCase/AnotherCase/g, however it only replacesCamelCaseand leftcamelCaseas is. No big deal, just something to remember. – wsams Mar 04 '16 at 23:15