vim Tips and tricks to boost productivity Quick "throwaway" macros


Add this to your vimrc:

nnoremap Q @q

To start recording the "throwaway" macro, use qq. To finish recording hit q (in normal mode for both).

To execute the recorded macro, use Q.

This is useful for macros that you need to repeat many times in a row but won't be likely to use again afterward.