Vim shortcuts

From xoa
Jump to: navigation, search

Common keystrokes in vim that I never remember.

Yank entire file

:%y

Drop a marker

ma

Jump to marker

`a

Open the file under the cursor

gf

Highlight any lines longer than 72 characters

:match errorMsg /\%>73v.\+/

Select from all the tags possible

:ts [ident]

List all buffers

:ls

Jump to buffer 12

:b12

Copy character from line above in insert mode

Ctrl-Y

Copy character from line below in insert mode

Ctrl-E