DEV Community

Discussion on: The "dot" Command in Vim

Collapse
 
fidelve profile image
FidelVe

for anyone interested in what would be the macro for doing this, let's say we have this lines:

this line
this other line
this line also

First, we move to the first line and type qa this will begin recording the macro (you will see at the bottom recording @a), then we type A;<ESC>jq, the q at the end will end the recording of the macro, and the macro that got recorded was A;<ESC>j.

After that to repeat the macro we type @a (and after that first one we can continue with @@ if we want).