Vi / Vim Graphical Cheat Sheet

ADVERTISEMENT

UK version 1.0
October 2nd, 14
vi / vim graphical cheat sheet
Esc
normal
mode
_
¬
"
·
!
$
%
^
&
*
(
)
+
1
£
external
reg.
goto
"soft"
repeat
next
begin
end
"soft" bol
next
not
not
eol
filter
spec
match
bol
:s
ident
sentence
sentence
down
line
used!
used!
-
=
·
1
2
3
4
5
6
7
8
9
0
3
2
auto
`
goto
"hard"
prev
format
mark
bol
line
· T
Q
W
E
R
Y
U
I
O
P
{
}
ex
next
end
replace
back
yank
undo
insert
open
paste
begin
end
mode
WORD
WORD
mode
'till
line
line
at bol
above
before
parag.
parag.
q
w
e
r
t
·
y
u
o
p
·
] ·
·
·
[
i
1
1,3
record
next
end
replace
insert
open
paste
'till
misc
misc
yank
undo
macro
word
word
char
mode
below
after
@ ·
·
A
S
D
F
G
H
J
K
L
:
~
append
subst
delete
"back"
eof/
screen
join
screen
ex cmd
play
toggle
help
at eol
line
to eol
find ch
goto ln
top
lines
bottom
line
macro
case
·
g
·
a
s
·
j
k
1,3
#
d
f
6
h
l
;
'
subst
prev
find
extra
repeat
goto
delete
append
char
ident
char
cmds
t/T/f/F
mk. bol
·
·
Z
4
X
C
V
B
<
3
>
3
?
|
N
M
prev
bol/
back-
change
visual
prev
un-
find
screen
quit
indent
(find)
goto col
space
to eol
lines
WORD
mid'l
indent
(rev.)
z
x
c
v
n
m
·
·
·
·
1,3
\
5
/
b
,
.
next
set
delete
visual
prev
not
extra
reverse
repeat
change
find
char
mode
word
(find)
mark
used!
cmds
t/T/f/F
cmd
Main command line commands ('ex'):
Notes:
moves the cursor, or defines
motion
the range for an operator
:w (save), :q (quit), :q! (quit w/o saving)
(1)
use "x before a yank/paste/del command
:e f (open file f),
to use that register ('clipboard') (x=a..z,*)
direct action command,
command
:%s/x/y/g (replace 'x' by 'y' filewide),
(e.g.: "ay$ to copy rest of line to reg 'a')
if
red
, it enters insert mode
:h (help in vim), :new (new file in vim),
(2)
type in a number before any action
requires a motion afterwards,
operator
operates between cursor &
to repeat it that number of times
Other important commands:
(e.g.: 2p, d2w, 5i, d4j)
destination
CTRL-R: redo (vim),
special functions,
CTRL-F/-B: page up/down,
(3)
duplicate operator to act on current line
extra
requires extra input
CTRL-E/-Y: scroll line up/down,
(dd = delete line, >> = indent line)
q ·
CTRL-V: block-visual mode (vim only)
commands with a dot need
(4)
ZZ to save & quit, ZQ to quit w/o saving
a char argument afterwards
Visual mode:
(5)
zt: scroll cursor to top,
bol = beginning of line, eol = end of line,
Move around and type operator to act
zb: bottom, zz: center
mk = mark, yank = copy
on selected region (vim only)
(6)
gg: top of file (vim only),
words:
quux(foo, bar, baz);
gf: open file under cursor (vim only)
WORDs: quux(foo, bar, baz);
For a graphical vi/vim tutorial & more tips, go to - home of ViEmu, vi/vim emulation for Microsoft Visual Studio

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go