LinuxCommandLibrary

VIM Texteditor

File Management

:e
:q
:q!
:w
:w {file}
:x

Navigation

k
h
l
j
w
W
e
E
b
B
0
$
gg
G
gk
gj

Insertion

a
A
i
I
o
O
R
:r {file}

Editing

u
yy
y{motion}
p
P
x
dd
d{motion}

Search and Replace

:s/foo/bar/
:s/foo/bar/g
:%s/foo/bar/g
:%s/foo/bar/gc

Multiple Windows

:e filename
:split filename
ctrl-w up arrow
ctrl-w ctrl-w
ctrl-w_
ctrl-w=
10 ctrl-w+
:vsplit file
:sview file
:hide
:only
:ls
:b 2
Copied to clipboard