this question has answer here:
- case preserving substitute in vim 5 answers
let's have:
foo , foo how can find , replace to
bar , bar with 1 regex/find , replace command in vim? default have vim setup find either uppercase , lowercase when searching. want replace keeping capitalization. possible?
i recommend tim pope's abolish plugin. provides :subvert or :s command short ask.
:%s/foo/bar/g drew neil on @ vimcast has nice screencast, supercharged substitution :subvert.
Comments
Post a Comment