vim The dot operator Basic Usage


The dot operator repeats the last action performed, for instance:

file test.tx

helo, World!
helo, David!

(cursor at [1][1])
Now perform a cwHello<Esc> (Change Word helo to Hello)
Now the buffer looks like that:

Hello, World!
helo, David!

(cursor at [1][5])
After typing j_ the cursor is at [2][1].

Now enter the . and the last action is performed again:

Hello, World!
Hello, David!

(cursor at [2][5])