Today I Learned

hashrocket A Hashrocket project

Vim macro is amazing!

If you want to repeat a bunch of vim commands for running multiple times, record them in a macro and run wherever you want.

To record a macro you need:

  1. type q followed by any char: [a-z]
  2. type your vim commands
  3. type q again to finish recording

Finally, to run the macro that you just created type:

@ followed by the same char you chose to store the macro.

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.