47649Preserve case during search & replace?
- Feb 10 9:44 AM[I searched all over the web for an answer to this problem,
including vim.org's Tips, Sourceforge, Google, and Google
Groups. I found one reference to it in comp.editors back in
2001, unsolved. The thread title is
"case-preserving replace in vi[m]?".]
Basically, I'd like to replace (e.g.) "apple" with "banana"
everywhere in a block of text, but if "apple" happens to be
capitalized, it should be replaced with "Banana". In other
words, I'd like a handy way of doing
(assuming noignorecase) with one command.
I could probably slog my way through a script to do this, but
it strikes me as a fairly useful feature - would Vim be likely
to have this feature added since 2001?
- << Previous post in topic Next post in topic >>