:wq
:q!
q [a-z] Some sequence of actions that you might want to automate q Now use the macro with @ and the letter you chose earlier
I used vim for longer than I care to admit without realizing macros are useful.
Reply on news.ycombinator.com