Vi / Vim Graphical Cheat Sheet

ADVERTISEMENT

version 1.1
adapted to IT layout by M. Monga
vi / vim graphical cheat sheet
Esc
normal
·
`
mode
goto
mark
(
£
·
? ·
!
$
%
&
)
=
/
|
^
" ·
not
1
bol/
repeat
begin
3
external
goto
find
"soft"
reg.
end
eol
find
auto
used!
goto col
:s
sentence
filter
match
(rev.)
bol
spec
sentence
format
~
1
2
3
4
5
6
7
8
9
0
\
2
'
·
toggle
"hard"
not
goto
case
bol
used!
mk. bol
· T
Q
W
E
R
Y
U
I
O
P
{
*
next
ex
next
end
replace
back
yank
undo
insert
open
paste
begin
ident
mode
WORD
WORD
mode
'till
line
line
at bol
above
before
parag.
q
w
e
r
t
y
u
o
p
+
·
·
·
·
i
[
1,3
1
next
record
next
end
replace
insert
open
paste
'till
undo
misc
yank
line
macro
word
word
char
mode
below
after
·
K
}
ò
à
A
S
D
F
G
H
J
L
not
not
end
append
subst
delete
"back"
eof/
screen
join
screen
help
used!
used!
parag.
at eol
line
to eol
find ch
goto ln
top
lines
bottom
@
] ·
·
g
k
·
a
s
1,3
j
#
d
f
h
l
·
6
prev
subst
find
extra
play
misc
delete
append
ident
char
char
cmds
macro
·
:
>
;
_
Z
4
X
C
V
B
3
N
M
repeat
ex cmd
prev
back-
change
visual
prev
screen
"soft" bol
quit
t/T/f/F
indent
(find)
line
space
to eol
lines
WORD
mid'l
down
·
<
z
·
x
c
v
n
m
-
1,3
5
b
,
.
3
un-
prev
next
set
delete
visual
prev
extra
reverse
repeat
change
indent
char
mode
word
(find)
mark
line
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 cmd
:e f (open file f),
to use that register ('clipboard')
direct action command,
command
:%s/x/y/g (replace 'x' by 'y' filewide),
(x=a..z,*) ay$ to copy rest of line to 'a')
red
, it enters insert mode
if
:h (help in vim), :new (new file in vim),
requires a motion afterwards,
(2)
type in a number before any action
operator
to repeat it that number of times
operates between cursor &
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 cur 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