Reply to message «Why does ':normal' ignore the 'count' prefix for mapped 
keys?», 
sent 08:00:58 06 January 2011, Thursday
by Douglas A. Augusto:

It looks like a bug and so must be forwarded to vim-dev mailing list. By the 
way, everything works with feedkeys:

    vim -u NONE -c 'redir! > messages' \
                -c 'execute "fu E(str)\nechom a:str\nretu \"\"\nendf"' \
                -c 'noremap <expr> _x E(v:count)' \
                -c 'normal 3_x' \
                -c 'call feedkeys("3_x:\<C-u>qa!\n")'

and you will get 0 and 3 in ./messages. Tested on vim-7.3.75 from gentoo repos 
and 7.3.98 (revision 763272b18e4f).

Original message:
> Suppose I've created the following map:
>    :map _x :<C-U>echo "v:count=".v:count<CR>
> 
> In normal mode I type
>    2_x
> and it prints
>    v:count=2
> 
> But in command-line mode if I enter
> 
>    :normal 2_x
> 
> it prints
>    v:count=0
> 
> Why is that?
> 
> 
> Thank you.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to