Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> a level of mastery where one deliberately "writes" macros (what, directly in the vimrc?)

Oh it's so simple you'll kick yourself. If you save the macro to the q register, just paste from the q register and it'll print out the corresponding inputs. Copy the inputs into the w register and now you have that macro saved in a second place.

Some people probably do save macros in their vimrc this way, but I use it to correct typos I made when recording the macro. BIG help.



> but I use it to correct typos I made when recording the macro.

Oh you mean like, now that you have the keystrokes inserted into the current document temporarily, edit and move back to a register?


Exactly. Modifier sequences and escape presses show up as special characters and can be inserted with `C-v Esc` or whathaveyou. It works seamlessly.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: