image/svg+xml
vi / vim graphical cheat sheet
prev(find)
N
n
next(find)
undoline
U
u
undo
exmode
Q
q
recordmacro
·
nextWORD
W
w
nextword
endWORD
E
e
endword
back'till
·
T
t
'till
·
insertat bol
I
i
insertmode
openabove
O
o
openbelow
appendat eol
A
a
append
substline
S
s
substchar
"soft"bol
^
6
prevident
#
3
eol
$
4
gotomatch
%
5
nextident
*
8
beginsentence
(
9
endsentence
)
0
"hard"bol
repeat:s
7
&
"soft" bol down
_
-
prevline
"back"find ch
F
f
findchar
·
·
R
replacemode
r
replacechar
·
ex cmdline
:
;
repeatt/T/f/F
motion
command
operator
extra
moves the cursor, or defines the range for an operator
direct action command,
requires a motion afterwards, operates between cursor & destination
special functions,requires extra input
if
red
, it enters insert mode
back-space
X
x
deletechar
q
·
commands with a dot needa char argument afterwards
playmacro
@
2
·
screenmid'l
M
m
setmark
·
visuallines
V
v
visualmode
prevWORD
B
b
prevword
find(rev.)
?
/
find
·
·
~
togglecase
`
gotomark
·
beginparag.
{
[
misc
·
endparag.
}
]
·
misc
|
bol/goto col
\
notused!
·
CTRL-R: redo (vim),CTRL-F/-B: page up/down,CTRL-E/-Y: scroll line up/down,CTRL-V: block-visual mode (vim only)
Main command line commands ('ex'):
bol = beginning of line, eol = end of line,mk = mark, yank = copy
Esc
normalmode
words:
WORDs:
quux(foo, bar, baz);
:w (save), :q (quit), :q! (quit w/o saving):e f (open file f),:%s/x/y/g (replace 'x' by 'y' filewide),:h (help in vim), :new (new file in vim),
Other important commands:
reg.spec
"
'
gotomk. bol
·
·
1
pastebefore
P
p
pasteafter
1
!
1
externalfilter
2
yankline
Y
y
yank
1,3
D
deleteto eol
d
delete
1,3
un-indent
<
,
reverset/T/f/F
3
indent
>
.
repeatcmd
3
+
nextline
=
autoformat
3
Z
quit
z
extracmds
·
·
4
5
G
eof/goto ln
g
extracmds
·
6
C
changeto eol
c
change
1,3
type in a number before any actionto repeat it that number of times(e.g.: 2p, d2w, 5i, d4j)
use "x before a yank/paste/del commandto use that register ('clipboard') (x=a..z,*)(e.g.: "ay$ to copy rest of line to reg 'a')
duplicate operator to act on current line(dd = delete line, >> = indent line)
Notes:
(1)
(2)
(3)
ZZ to save & quit, ZQ to quit w/o saving
(4)
zt: scroll cursor to top,zb: bottom, zz: center
(5)
gg: top of file (vim only),gf: open file under cursor (vim only)
(6)
Move around and type operator to acton selected region (vim only)
Visual mode:
For a graphical vi/vim tutorial & more tips, go to www.viemu.com - home of ViEmu, vi/vim emulation for Microsoft Visual Studio
screentop
H
h
joinlines
J
j
help
K
k
screenbottom
L
l
quux(foo, bar, baz);
version 1.1April 1st, 06