On Jun 17, 2:33 pm, Christian Brabandt <cbli...@256bit.org> wrote: > Hi rameo! > > On Fr, 17 Jun 2011, rameo wrote: > > > > > On Jun 17, 1:31 pm, Christian Brabandt <cbli...@256bit.org> wrote: > > > Hi rameo! > > > > On Fr, 17 Jun 2011, rameo wrote: > > > > > This doesn't seem to work (or I did something wrong). > > > > > p.e. command 1 = :%s/foo/bar/g > > > > > let command_1 = ':%s/foo/bar/g' > > > > an 98.002&Edit\ Menu.Do\ command\ 2\ :command_1 ?? > > > > You need to evaluate the variable first. This is done using the :exe > > > command. > > > > See also this question from the > > > faq:http://vimhelp.appspot.com/vim_faq.txt.html#faq-25.13 > > > > regards, > > > Christian > > > I can't make this work. > > > 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 ?? > > > Tried everything without success > > You should use :exe 'an 98.002&Edit\ Menu.Delete\ Matches' deletematches1 > > regards, > Christian > -- > Kunst: Eine andere Natur, auch geheimnisvoll, aber > verst ndlicher; denn sie entspringt aus dem Verstande. > -- Goethe, Maximen und Reflektionen, Nr. 1144
Still doesn't work. Something wrong with my variable declaration (let deletematches1.....)? 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?) -- 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