maanantai 1. kesäkuuta 2015

VIM commands that I found useful

ctrl-d

Autocompletion in normal mode commands. Surprisingly useful with e.g. :help q<ctrl-d>.

q<register><commands>q

Record a macro to <register> (can be any alphabet in a-z). <commands> can include multiple commands.

<times>@<register>

Execute macro <times> times from <register>.

I in block visual mode

Insert text to multiple lines.

c in block visual mode

Change text in multiple lines.

ci{ or ci[ or ci(

"Change inside <brackettype>". Also works with vi{, i.e. "Visual selection inside <brackettype>".

zf (in visual mode) and za (in insert mode)

Create a code fold and open/close the fold. Also :mkview can be used to save the folds and :loadview to load previously saved folds.

Ei kommentteja:

Lähetä kommentti