ALP wrote:
> Hi all,
>
> I'm new to the group so let me know if my question etiquette is
> lacking.
>
> I'm using gvim portable at work which utilizes vim 7.1.42 and in my
> vimrc I can't find the proper syntax for a search/replace regex with
> alternatives in a group; i.e.
>
> " delete all occurrences of foo and bar
> map ,blah :%s/\(foo\|bar\)//g
>
> from googling I've tried replacing "\|" with
> | \| \\| <Bar> \<Bar> \\<Bar> <Bar> and even <Leader><Bar>
>
>
> All either generate an error "Not an editor command" or compile but
> fail to have the desired behavior.
>
> Any thoughts, other permutations to try, or am I just making a silly
> mistake.
>
> Thanks a lot for any comments/thoughts.
>
>   
Try:

map ,blah :%s/\(foo\<bar>bar\)//g<cr>

Regards,
Chip Campbell



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to