I read that
. is used for repeating the last command in Normal Mode. So if I used the command
2w move forward two words and then press
. then I would expect to move two words more however this does not happen.
Could anyone please tell me why ?
As stated in
:h . the dot command only repeat changes, but commands like
w are motions not changes.
You can repeat motions like
T with the commands
:h ;). And for more complex repeat you could have a look to the easymotion plugin readme: combined with vim-repeat you might be able to repeat the movements the way you want to do it.
Vim answers this in the help about the dot command:
. Repeat last change, with count replaced with [count]. Also repeat a yank command, when the 'y' flag is included in 'cpoptions'. Does not repeat a command-line command.
. simply repeats the last change, not motions, or command-line commands.