Show Menu
Cheatography

Vim internals Cheat Sheet (DRAFT) by

Vim - my editor of choice

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Searching

:lvim PATTERN %
Search current buffer for PATTERN
:lw
show location list
:lcl
close location list
:lne
next location list entry
:lp
previous location list entry
/Pattern
search current buffer forward for Pattern
?Pattern
search current buffer backwards for Pattern

Delete

dd
delete whole line
d/PATTERN
enter
delete from current cursor position to PATTERN
v/PATT­ERN/d
delete all lines not containing PATTERN

Specials

:%s/PA­TTE­RN//gn
Count occurences of PATTERN

Counts

ga
Print the ascii value of the character under the cursor
g
CTRL+g
in visual mode shows current cursor position, number of words and bytes in current document.

Moving & copying lines

:m'm
move current line to mark
m
:8,9t.
copy line 8 and 9 to current line
:.m$
move current line to end of file

Folding

zc
close fold
zo
open fold
za
toggle fold
zm
close all folds in buffer
zr
open all folds in buffer
 

My must have plugins

surround
https://github.com/tpope/vim-surround
visual-increment
https://github.com/triglav/vim-visual-increment
CaptureClipboard
http://www.vim.org/scripts/script.php?script_id=3246
ragtag
https://github.com/tpope/vim-ragtag
Tabular
https://github.com/godlygeek/tabular
sneak
https://github.com/justinmk/vim-sneak
EasyGrep
https://github.com/vim-scripts/EasyGrep
better-whitespace
https://github.com/ntpeters/vim-better-whitespace
ctrlp
https://github.com/kien/ctrlp.vim
gundo
https://github.com/sjl/gundo.vim
syntastic
https://github.com/scrooloose/syntastic
tagbar
https://github.com/majutsushi/tagbar
vim-activity-log
https://github.com/AD7six/vim-activity-log

Langua­geTool

:Langu­age­Too­lCheck
Text prüfen
:set spelll­ang=en
für Text in englischer Sprache
:set spelll­ang=de
für Text in deutscher Sprache
:Langu­age­Too­lClear
Markie­rungen löschen
:lne
nächster Fehler