- increase number under cursor:
ctrl+a
- decrease number under cursor:
ctrl+x
- replace one word with another: select first word, e.g.
vi"
; select second wordvi"
and pastep
- search from within vim, don't jump to first match: vimgrep /render_show/gj **/*.rb
- resize horizontal split:
ctrl+w -
/ctrl+w +
- resize horizontal split to maximum:
ctrl+w _
- make horizontal and vertical splits equally big:
ctrl+w =
- resize vertical split:
ctrl+w <
/ctrl+w >
- list buffers:
ls
- go to previous buffer:
e#
- go to buffer with number:
e#1
- new tab:
:tabnew
- next tab:
:tabn
- previous tab:
:tabp
- rotate throught tabs:
gt
in normal mode - go to tab with number:
:tabm
<tab_number> - open files in tabs when starting vim:
vim -p file1 file2 file3
- search and replace in all tabs:
:tabdo %s/foo/bar/gc