Monday, December 28, 2009

Re: this nmap and imap work, but the vmap does not

On Dec 27, 9:46 am, Bee <200...@calcentral.com> wrote:
> Adding <esc> did allow it to work, but only on the last line of the
> selection.
>
> How can the selection be passed on?

Oops, I neglected that part.

Your explicit visual-mode mapping works on every line because pressing
':' in visual mode automatically enters a range of '<,'> to your Ex
command, which means to run the Ex command on the visual selection. I
do not think you will be able to use <F5> in your mapping after all,
without some logic to determine what mode you are in, in which case it
would just be easier to explicitly specify the command in a visual-
mode mapping.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment