cat -> horse CAT -> HORSE Cat -> Horse
I know this is underspecified (e.g. unclear what cAt should become). However, is there a canonical solution for this?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
The vim-abolish plug-in implements a
:Subvert command that performs substitutions taking case in consideration. (It can also preserve plurals, including exceptions in plural forms.)
See the README file with examples, specifically on case:
Oh, but the case variants!:%s/Facility/Building/g :%s/FACILITY/BUILDING/g
Abolish.vim has your back. One command to do all six, and you can repeat it with