On 27/12/09 16:28, Ben Fritz wrote:
On Dec 25, 9:54 pm, Bee<[email protected]> wrote:
visually select 4 lines
This vmap does NOT work. How to make it work?
vmap<F5> <F5>gv
This mapping does not (as you seem to intend) trigger the normal-mode
mapping for<F5>, because it never leaves visual mode. Instead, it
just continually calls itself recursively until it reaches the limit
defined in Vim, I think by a configurable option.
No, because the {lhs} is at the start of the {rhs}, see ":help
recursive-mapping". In this case the F5 is not mapped again, and so does
what F5 does by default in Visual mode (i.e. nothing) followed by gv
You probably want something like:
vmap<F5> <ESC><F5>gv
Best regards,
Tony.
--
Eternal nothingness is fine if you happen to be dressed for it.
-- Woody Allen
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php