Vim: Repeat previous motion?
Let's say that I'm in visual mode, and I type "aw" to extend the visual area to include the next word. I'd like to then include the next couple of words. Is there a single key that I can press to repeat the previous motion (include text object motions)?
I'm aware that '.' repeats the previous change, and 'n' repeats the previous search, amongst other 'repeat' commands, but I'm unaware of any command to repeat the previous motion (whatever it was).
Well there is a command to repeat every motion made with f,t,F or T
Remember that
fx takes to the next occurrence of the character x
Fx takes to the previous ocurrence of x
tx takes you to the character before the next occurrence of x
Tx takes you you to the character after the previous occurrence of x
to repeat those motions press
;
to repeat them backwards (in the oposite direction) press
,
There are some plugins that provide this functionality:
- repmo.vim: repeat motions for which a count was given
- repeatable-motions.vim: Make most motions repeatable
- repmo.vim: give vim support of repeat motion operations (k,j, h,l, w,b, W,B, e,E, ge,gE)