ZyX wrote:

> Consider the following script:
> 
>     vim -N -u NONE -c 'call setline(".", range(1000))' \
>                    -c 'exe "fu! EV()\nechom 0\nnormal! gv30j\nendfu"' \
>                    -c 'vnoremap <silent> \e :call EV()<CR>' \
>                    -s <(<<< 'V4j\e')
> 
> You will see that while function EV was called 5 times (five zeroes in 
> :messages), cursor is on the line containing number 33, while it is
> expected to be on line with number 5*30=150.

This is a puzzle.  Can you write this as a Vim script instead of a
one-liner shell command?  Can you map something else than \e (is that
taken literally or converted into an escape?).  Why would the function
be called five times, there is only one \e.

-- 
If VIM were a woman, I'd marry her.  Slim, organized, helpful
and beautiful; what's not to like?     --David A. Rogers

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui