Vim Tips and Tricks

February 16, 2010

The FastSoft engineers often give presentations to bring each-other up to date on technical issues. These presentations are appropriately called “speedups” (get it? fastsoft? speedups? har har). This speedup, given by @kriskowal, is a tricks and tips discussion on his favorite editor, vim.

Slides” for this presentation:

^w hjkl move to windows

^w HJKL move windows

^w +- horizontal resize
^w = even splits
^w10<> vertical resize

O
I  ia  A
o

gg
0     ^      $
G

{
}

:!

   /----------------------\
   |:e :e# :vs :sp ^w hjkl|
   |:e :e# :vs :sp ^w hjkl|
   |:e :e# :vs :sp ^w hjkl|
   |:e :e# :vs :sp ^w hjkl|
   \----------------------/

:n :N

Vv^V o
>> <<
=
:set et sw ts
:!expand unexpand
gq
:set ve=all
comment/uncomment
:set incsearch n N
:noh
:set tw

highlight OverLength ctermbg=red ctermfg=white guibg=red guifg=white
match OverLength '\%78v.*'

:set modeline
:set wrap lbr number
/ n .