vim macros are cool

To record a temporary macro in Vim:

  1. Press q followed by a letter to specify the register where you want to store the macro (e.g., q followed by a to store it in register a).
  2. Perform the desired sequence of commands.
  3. Press q again to stop recording the macro.

To execute the recorded macro, type @a (replace a with the register you used).

✌🏼 Like my content? Subscribe via RSS feed.