ALP wrote:
> On Nov 16, 11:54 am, Charles Campbell <[email protected]>
> wrote:
>   
>> map ,blah :%s/\(foo\<bar>bar\)//g<cr>
>>     
>
> syntax with <bar> (whether it's <bar> \<bar> or \\<bar>) doesn't cause
> a "not an editor command" error, but fails to remove occurrences of
> foo and bar in the document.
>
> So, my vim doesn't like variations of | at all and doesn't understand
> I mean a | when <bar> is used, I guess.
>
> Thanks Chip.
>   
I tested the mapping I gave; it worked.  So its a question of finding 
out what's happening
with your setup.  Some ideas...

1. What's  vim --version  show?
2. Find out what your mapping actually looks like:

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

I get    E15: Invalid expression: %s/\(foo\|bar\)//g    but clearly the 
substitute looks right.

3. Check your cpoptions setting;  you don't want the "<" character in 
there for this to work.
    See  :help map_bar


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