Hi rameo!

On Fr, 17 Jun 2011, rameo wrote:

> On Jun 17, 2:33 pm, Christian Brabandt <cbli...@256bit.org> wrote:
> > On Fr, 17 Jun 2011, rameo wrote:
> > > This is my command:
> > > let deletematches1 = ':call <SID>CopyMatchesLines("%","")<CR>:let @c =
> > > ""<CR>:g/<C-r>//d C<CR>:let @*=@c<CR>'
> >
> > > this is my menu:
> > > an 98.002&Edit\ Menu.Delete\ Matches\    :exe
> > > deletematches1                 ??
> >
> > You should use :exe 'an 98.002&Edit\ Menu.Delete\ Matches' deletematches1
> >
> Still doesn't work.
> Something wrong with my variable declaration (let
> deletematches1.....)?

Do you get an error message? I tested it with your test string and it 
worked, besides the face, that Vim complained about the <SID> string 
with E81, which should be okay, since I tested it by entering the string 
manually and did not source a script file.

> The command is correct (works when I add it to the menu) but maybe I
> have to change something inside the variable declaration. (Can I use
> <CR> inside the declaration?)

No. You included it inside single quotation marks. That should prevent 
vim from messing with the string as it does with double quotation 
strings (see :h expr-string).
And the <CR> is ok, since it is needed for the :an command.

As a check, you can :echo deletematches1 to see, if it looks like what 
you want.

regards,
Christian

-- 
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