Vi/vim Graphical Cheat Sheet

ADVERTISEMENT

vi/vim graphical cheat sheet
Esc
normal
mode
(
)
½
" ·
%
&
/ ·
=
` ·
!
#
¤
¹
³
external
reg.
prev
goto
repeat
begin
end
auto
find
goto
find
filter
spec
ident
match
:s
sentence
sentence
format
(rev.)
mark
{
[ ·
] ·
}
1
2@·
3
4
$
5
6
7
8
9
0
+
§
\
²
´
begin
end
next
eol
par
par
line
^
Q
W
E
R
Y
U
I
O
P
Å
ex
next
end
replace
back
yank
undo
insert
open
paste
“soft”
mode
WORD
WORD
mode
‘till
line
line
at bol
above
before
bol
u
i
o
å
w
e
·
¨
¹
³
p
¹
q
y
,
~
end
replace
insert
open
paste
toggle
record
next
‘till
yank
undo
word
char
mode
below
after
case
macro
word
A
S
D
G
H
K
L
J
Ö
Ä
*
append
subst
delete
“back”
eof/
screen
join
screen
next
help
at eol
line
to eol
find ch
goto line
highest
lines
lowest
ident
a
s
d
h
k
l
ö
ä
’ ·
g ·
¹
³
j
,
subst
find
extra
goto
append
delete
char
char
cmds
mk. bol
_
>
X
C
V
B
N
M
;
:
³
back-
change
visual
prev
prev
screen
repeat
ex cmd
“soft” bol
indent
quit
space
to eol
lines
WORD
(find)
middle
t/T/f/F
line
down
-
<
x
c
v
b
n
,
.
³
|
un-
¹
³
bol/
,
extra
repeat
prev
delete
visual
prev
next
set
reverse
in-
goto
change
cmds
char
mode
word
(find)
mark
t/T/f/F
cmd
line
dent
col
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
:tabe f (open file f in new tab),
to use that register (’clipboard’) (x=a...z,*)
direct action command,
command
:e f (open file f), :gt (next tab),
(e.g.: ''ay$ to copy rest of line to reg 'a')
if red, it enters insert mode
:%s/x/y/g (replace ‘x’ by ‘y’ filewide),
( 2 )
type in a number before any action
requires a motion afterwards,
:h (help in vim), :new (new file in vim)
operator
to repeat it that number of times
operates between cursor and
Other important commands:
(e.g.: 2p, d2w, 5i, d4j)
destination
Ctrl-R: redo (vim),
special functions,
( 3 )
duplicate operator to act on current line
extra
Ctrl-F/-B: page up/down,
requires extra input
(dd = delete line, >> = indent line)
q ·
Ctrl-E/-Y: scroll line up/down,
commands with a dot need
( 4 )
ZZ to save and quit, ZQ to quit w/o saving
Ctrl-V: block-visual mode (vim only)
a char argument afterwards
( 5 )
Visual mode:
zt: scroll cursor to top,
bol = beginning of line, eol = end of line,
zb: bottom, zz: center
mk = mark, par = paragraph, yank = copy
Move around and type operator to act
( 6 )
on selected region (vim only)
gg: top of file (vim only),
words:
quux(foo, bar, baz);
gf: open file under cursor (vim only)
WORDS:
quux(foo, bar, baz);

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go