> You could make the "implementation" mapping be defined for visual
> mode, then map normal-mode <F5> to V<F5> and insert mode <F5> to
> <C-o>V<F5>, or something like that, but then using <F5> in normal or
> insert mode would clobber the '< and '> marks. You could split out
> the important part of the implementation into a cmap, and have normal,
> insert, and visual all be mapped to something that gets into
> command-line mode with the correct leading range, and then invokes
> that cmap, but that's almost certainly more trouble than it's worth.
> It's probably best to just define the map multiple times.
Thank you Matt
I tried:
vmap <silent> <F5> :s/^/\\ /e<cr>
nmap <F5> V<F5>
imap <F5> <c-o><F5>
It works great.
It does not matter that the '< and '> marks are clobbered.
-Bill
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment