On 04/03/09 20:30, Maxim Kim wrote:
>
>
> On 4 мар, 22:00, Charles Campbell<[email protected]>  wrote:
>> I've taken a little liberty with the Hello command itself, but perhaps
>> you can modify this further to suit you:
>>
>> command! -count=1 Hello call Hello(<count>)
>> map ,ff :<c-u>call Hello(v:count)<CR>
>
> Thanks!
> v:count is just what I have been looking for.
>
> function! Hello(count)
>    "do smth useable here a:count
>    echo a:count
> endfunction
> command! -count Hello call Hello(v:count)
> map ,ff :Hello<CR>
>
> Regards,
> Maxim Kim

Without <C-U> this will convert whatever count you prepended to the 
mapping to a range of (count) lines starting at the cursor line.

See ":help v:count" for details, and an example.


Best regards,
Tony.
-- 
Darth Vader sleeps with a Teddywookie.

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

Reply via email to