image/svg+xml
vi / vim graphical cheat sheet
http://www.viemu.com/
vi vim cheat sheet
lerouge
un-indent
<
,
reverset/T/f/F
3
.
repeatcmd
indent
>
3
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
6
prevident
#
3
4
gotomatch
%
5
8
beginsentence
(
9
0
"hard"bol
7
"soft" bol down
_
-
prevline
"back"find ch
F
f
findchar
·
·
R
replacemode
r
replacechar
·
;
repeatt/T/f/F
ex cmdline
:
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
2
screenmid'l
M
m
setmark
·
visuallines
V
v
visualmode
prevWORD
B
b
prevword
/
find
·
~
togglecase
beginparag.
{
[
misc
·
]
·
misc
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 comands:
'
gotomk. bol
·
reg.spec
"
·
1
pastebefore
P
p
pasteafter
1
|
bol/goto col
!
externalfilter
1
2
yankline
Y
y
yank
1,3
D
deleteto eol
d
delete
1,3
+
nextline
=
autoformat
3
Z
quit
·
4
z
extracmds
·
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.1November, 13th, 2007azerty version
/
find
·
find(rev.)
?
·
,
reverset/T/f/F
playmacro
@
·
°
endparag.
}
endsentence
)
à
ç
"soft"bol
^
è
nextident
*
repeat:s
&
é
eol
$
£
ù
µ
`
gotomark
·
"soft"bol
^
¨
§