habits

Send to Kindle
home » snippets » vim » habits


More

Habits

\<Ctrl-D>
You can press <ctrl-D> to view the whole list of possible completions at one time. For example, enter ':colo ' then press <ctrl-D> and you'll see a list of all the colorscheme names. (The space in ':colo ' is important, since if you press ctl-D with just ':colo' Vim will just show you the 'colorscheme' completion. . . )

g <C-g>
Show current cursor position, word position, etc.

g- and g+
Undo/redo – based on time. Very cool!

<C-g>u
Break the current insert mode change and start a new change for undo purposes.

s
Change a character. S changes the whole line.

]p
Just like p, but it automatically adjusts the indent level of the pasted code to match that of the code you paste into. Try it!

g@
Calls operatorfunc. Define your own function to do stuff on selections. Eg. g@iw to do something on the word you selected (ciw would have changed the word but g@iw will do whatever you choose to that word.)

K
Go to the man page for the word under cursor. Ripe for customizing. Unlike jumping to the tag, I can use this to generate on the fly docs for the symbol.