On 7/14/06, Maciej Kalisiak <[EMAIL PROTECTED]> wrote:
Is it possible to have the :s substitute command to imitate the case
of the match when substituting?  For example, with a single
:%s/foo/bar/i  I'd like the following to happen:

matched  ->  desired
foo -> bar
Foo -> Bar
FOO -> BAR

I looked at :h :s_flags, but nothing seems to fit...

Try this script:
  http://www.vim.org/scripts/script.php?script_id=6
  keepcase.vim : Functions for doing case-persistant substitutions

Yakov

Reply via email to