How to repeat some action certain times on Vim?

Viewed 18528

In Vim, I usually want to repeat some series of commands some times. Say, I want to comment 5 lines, I would use

I//<Esc>j
.j.j.j.j

Is there any way to repeat the last ".j" part several times?

6 Answers

Try this:

  1. Do something

  2. Exit to normal mode

  3. Type, for example, 22.

The last commands will repeats 22 times.

Related