On Sun, 18 Sep 2011, Jose Caballero wrote:

Hi,

I would like to know if it is possible to replace 'foo' by 'bar', 'FOO' by 'BAR' and 'Foo' by 'Bar' (or at least the first two), with a single command. Any link or the right :help command would be enough.

From: http://vim.wikia.com/wiki/Search_and_replace

"""
For substituting patterns with a corresponding case-sensitive text, Michael Geddes's keepcase¹ plugin can be used, e.g.:

:%SubstituteCase/\cHello/goodBye/g
        Substitute 'Hello hello helLo HELLO'
        by 'Goodbye goodbye goodBye GOODBYE'
"""

¹: http://www.vim.org/scripts/script.php?script_id=6

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to