Vim Motions

VIM Basics

Movement

  </div>
↑ - k
← - h
→ - l
↓ - j

Words

  </div>
w - next word
b - previous word
e - end of next word

Exit

  </div>
:q - quit 
:qw - save & quit
:w - save
:q! - quit without saving

Screen Navigation

  </div>
G - end of file
gg || :0 - beginning of the file
% - jump to matching '()', '{}', '[]'
<c-b> - page up
<c-f> - page down

Line Navigation

  </div>
0 - Move to beginning of line
^ - First non-blank char of line
$ - End of the line

Word Navigation

  </div>
w   - next word
b   - prev word
0   - start of line
^   - first non-blank char of line
$   - end of line

Text Editing

  </div>
a   - append
A   - append from the end of the line
I   - insert at the beginning of line
o   - insert from new line
O   - insert from prev line
x   - delete char under cursor
s   - delete character & insert
S   - Delete line and insert
C   - delete to the end of line and insert
r   - replace single character
R   - Enter Replace mode

Clipboard

  </div>
u     - undo
<c-r> - redo

More Vim

Select within (), {}

  </div>
:vi(  - select text within ()
:vib  - select text within ()

:vi{  - select text within {}
:viB  - select text within {}

Visual Modes

  </div>
v - visual mode
V - line visual mode
<c-v> - visual block mode