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

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

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.



Got any vim Question?