Re: can :s imitate case of match when replacing?

2006-07-15 Thread Maciej Kalisiak
On 14/07/06, Marshall Abrams [EMAIL PROTECTED] wrote: I just asked the same question recently. The following email includes all of the recent discussion: From: [EMAIL PROTECTED] Subject:Re: auto upper/lower in replace pattern based on search pattern? Date:

can :s imitate case of match when replacing?

2006-07-14 Thread Maciej Kalisiak
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...

Re: can :s imitate case of match when replacing?

2006-07-14 Thread Yakov Lerner
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