vim-reference




Pay Notebook Creator: Salah Ahmed0
Set Container: Numerical CPU with TINY Memory for 10 Minutes 0
Total0

Macros

Macros help you automate a series of commands.

Recording macros

Macros can be stored in any key. Here are the steps to creating macros.

  • q
    • begin macro
  • {key}
    • this is the key where you will store the macro
    • after you press this key the macro will begin to record
  • {series of keys}
    • this is the commands you want to automate with the macro
  • q
    • exits the macro recording

Executing macros

  • @ + {macro_key} Example:
  • qrdd/href< enter >q
    • this records a macro to key r
    • the macro deletes the line and then searches for the pattern "\