Monday, June 2, 2014

vi macro - tip

I always wanted to know that: macro on vi ...




Instructions: To enter a macro, type:
q<letter><commands>q
To execute the macro <number> times (once by default), type:
<number>@<letter>


Example: So, the complete process looks like:
qdstart recording to register d
...your complex series of commands
qstop recording

Then, for re-executing the macro :

@dexecute your macro
@@execute your macro again

No comments: