34921Re: Mapping with count
- Dec 4, 2002kbosau@... wrote:
> Hi,Silly me! This can already be done:
> I'd like to create a normal mode mapping one
> can control by a number that has to be typed
> in prior to hitting the mapped key...
> function! f()
> Do something dependent of the
> value of the number that has
> been typed prior to hitting 'z'
> nmap z :call f()<Cr>
> for instance should define a normal mode
> command '34z'.
> How can I achieve this?
" Remember to start the function name with a capital!
echo "count =" v:count
\ ", count1 =" v:count1
\ ", prevcount =" v:prevcount
HTH --Benji Fisher
- << Previous post in topic Next post in topic >>