> I believe that I have found it.
> it is the<C-r>/ command
>
> let delmatches = ':g/<C-r>//d C'
> an 98.002&Edit\ Menu.Delete\ Matches\ :exe delmatches<CR>
> ---> doesn't work (E486 pattern not found:<C-r>)
>
> an 98.002&Edit\ Menu.Delete\ Matches\ :g/<C-r>//d C<CR>
> ---> does work.
>
> Any idea?
>
As was told you already at least twice in this thread (maybe three
times, I didn't recheck the whole thread), you should put the menu
command inside the :execute
let delmatches = ':g/<C-R>//d C<CR>'
exe 'an 98.2 &Edit.Delete\ &Matches' delmatches
This way, the delmatches variables will be evaluated when the menu is
defined, and the <C-R> stored by the :anoremenu command as an actual
Ctrl-R character. The way you did it (quoted above), the delmatches
variable would be evaluated when invoking the menu, with the result that
you search for "less-than, C, dash, r, greater-than" and if found, do
(IIUC) an additional search for "d space C". The textual search finds no
match, and you get an error.
Regards,
Tony.
--
The goal of Computer Science is to build something that will last at
least until we've finished building it.
--
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
No comments:
Post a Comment