jasonfry.co.uk

Moving around a line

Words

w W Next word (lowercase is A-z, uppercase is !whitespace)

b B Previous word

e E End of word

Lines

^ move to start of line (no whitespace)

0 move to start of line

$ move to end of line

Inserting

I Start of line then insert

A End of line then insert

o New line then insert

O New line above then insert

Moving around a file

{ Move to start of previous paragraph or code block.

} Move to end of next paragraph or code block.

Ctrl+F Page Down

Ctrl+B Page Up

gg Beginning of file

G End of file

Searching

/ search

* or # Search for word under cursor

n find Next

N find previous

:noh clear last search highlight

f<char> Move forward over the next occurrence of the character.

t<char> Move forward until the next occurrence of the character.

F<char> Move backward over the previous occurrence of the character.

T<char> Move backward until the previous occurrence of the character.

Other

Ctrl+[ Esc

:e reload file

m a NERDTree new file

Basics

h j k l Move

i insert

r<char> replace character under cursor

dd delete line

x delete character

y yank (copy)

yy yank current line

p paste

P paste above

v select

V select line

Splits

Ctrl+w direction move split

Ctrl+= Relayout splits evenly

o (NERDTree) open file in last split

s (NERDTree) open file in new vsplit

Links