In vim
, I know I can search with or without case sensitivity. But if I want to search for a string in either upper or lower case, and replace it with a replacement of the same case, is that possible in a single :s///
?
For example, I want to change these lines:
short
Short
SHORT
to
long
Long
LONG
I can do this in three :s
commands, or one insensitive :s
and go fix the cases manually, but is there a better way? A case-preserving search and replace?