www.neotek.ch

This is an old revision of the document!


Vi / Vim Cheatsheet

Open Files, save and exit

$ vi file   # open file
:w          # save (write)
:wq         # save and quit 
:x          # abbreviation of wq
:q!         # quit without save

Grammar

h            # cursor left
j            # cursor down
k            # cursor up
l            # cursor right
0            # (zero) move to beginning of the line
$            # move to the end of the line
w            # move to the beginning of the next word
}            # skip to next section
H            # Jump to the beginning of the displayed screen
M            # Jump to the center of the displayed screen
L            # Jump to the bottommost line shown
CTRL-f       # Jump down one Page
CTRL-b       # Jump up one Page
CTRL-d       # Jump down halve a page
CTRL-u       # Jump up halve a page
gj           # For very long lines that wrap at the screen edge, jump up one line.
gk           # For very long lines that wrap at the screen edge, jump down one line.
%            # Jump to the next bracket character (){}[]
computer/software/cheatsheets/vim.1788630871.txt.gz · Last modified: 2026/09/05 17:54 by admin