vim using macros
Using Macros
// To create a macro
q<letter><command>q
// To use the macro
<number>@<letter> // where number defaults to 1
Example usage
- press
qato start recording a macro with the lettera. - enter the commands. When incrementing, use ^a and ^x to decrement instead of hard coding numbers.
- press q when done with the commands.
@ato execute the command once.10@ato execute the command ten times.@@to execute the macro (that was entered most recently) again.