Thursday, September 9, 2010

RE: count and v:operator not set correctly in vim7.3

yoru.007 wrote:
> Did anyone come into this problem? I typed "d2w" and "3d2w"
> in normal mode and ":echo v:count", the result were all 0.

The problem is that when you type ":echo v:count" there is
no count (it was a previous command which had a count).

Borrowing from ':help v:count', you could try this:

:map <F8> :<C-U>echo "the count is " . v:count<CR>
3d2<F8>

That is, type 3 then d then 2 then press F8 to invoke the
mapping. It displays "the count is 6".

John

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

No comments:

Post a Comment