- How do delete without clobbering the "clipboard" register:
Delete to the "black hole register", "_". For example:
"_dd
- How to enter the solution to a quick math equation while in insert mode:
Use the "expression register", "=". You can even use variables. For example:
^r=5325*30<ENTER>
- How to edit a macro once you've recorded it:
Paste, edit, and re-yank its register. For example, hitting "qq" will record to register "q". If you want to edit it, you can do "qp, make your changes, then visually select it and do "qy.
- How to access prior contents in the clipboard:
Use registers 0 - 9. For example, "0p will paste whatever was in the clipboard register before you yanked whatever's in there now.
BONUS ROUND:
- In command mode, how to insert the word currently under the cursor:
^r^w
(That's Ctrl-r, Ctrl-w)
- Insert a register's literal contents:
For example, if you have a ^m (newline) character in the a register, but you want to input the ^m character instead of an actual newline while in insert mode:
^r^ra
- Insert the full path of the filename currently under the cursor:
^r^f
(This only works if it's in your 'path' variable, like with gf.)
Delete to the "black hole register", "_". For example:
- How to enter the solution to a quick math equation while in insert mode:Use the "expression register", "=". You can even use variables. For example:
- How to edit a macro once you've recorded it:Paste, edit, and re-yank its register. For example, hitting "qq" will record to register "q". If you want to edit it, you can do "qp, make your changes, then visually select it and do "qy.
- How to access prior contents in the clipboard:
Use registers 0 - 9. For example, "0p will paste whatever was in the clipboard register before you yanked whatever's in there now.
BONUS ROUND:
- In command mode, how to insert the word currently under the cursor:
(That's Ctrl-r, Ctrl-w)- Insert a register's literal contents: For example, if you have a ^m (newline) character in the a register, but you want to input the ^m character instead of an actual newline while in insert mode:
- Insert the full path of the filename currently under the cursor: (This only works if it's in your 'path' variable, like with gf.)