On Mon, Sep 11, 2006 at 09:11:50AM +0200, Jürgen Krämer wrote:
> 
> Hi,
> 
> Tom Carr wrote:
> >
> > Let's say I have the following mapping:
> > nnoremap = 3l
> > 
> > Now if I type =, it moves 3 characters to the right, as expected.
> > Now if I type 1=, it moves 13 characters to the right instead of 3.
> > Now if I type 3=, it moves 33 characters to the right instead of 9.
> > 
> > Any idea how to make the counts work correctly with the mapping?
> > (Vim 7.0)
> 
> you can achieve the desired behaviour with the help of a register:
> 
>   :let @q = '3l'
>   :nnoremap = @q
> 
> Regards,
> Jürgen

     Good idea.  I did not think of that solution.  I prefer not to tie
up a register this way, so I suggest this alternative:

:nnoremap = @='3l'<CR>

:help complex-repeat

(for the sake of the OP and any lurkers).

HTH                                     --Benji Fisher

Reply via email to