Can we do case-insensitive substitution and preserve existing case in Vim?
What I mean is: searching for BadJob
and replacing with GoodJob
would do
the following replacements:
'badjob' -> 'goodjob'
'BadJob' -> 'GoodJob'
'badJob' -> 'goodJob'
'BADJOB' -> 'GOODJOB'
Similar question for Visual Studio: Case preserving find/replace in Visual Studio
Use abolish.vim:
:%S/badjob/goodjob/g