Professional Documents
Culture Documents
Vim Cheat Sheet For Programmers Screen
Vim Cheat Sheet For Programmers Screen
3+
:version
Revision 2.0
Sept. 11, 2011
Normal
HOW-TO make Vim not suck Out of the Box: :help statusline :set nocompatible ruler laststatus=2 showcmd showmode number
~ toggle case
` goto mark
13
Ctrl 5
extern filter
play
macro
prev
identifier
goto
match
Shift
ex mode
WORD
record
macro
word
incr. #
10
scroll line
end
WORD
end
word
subst line
del
a append
subst char
del
7,11
decr. #
quit
extra
4
5
4
12
0
2
Ctrl ^
5
:redo
10
scroll line
T until char Y
copy line
replace
char
copy
until char
page
file/cursor info
F find char G
goto eof /
goto line#
find char
Normal / Cancel
block select
select
lines
select
chars
del char
change
del char
change
0
2
extra
page
Ctrl 7
Ctrl 8
Ctrl 9
Ctrl 0
repeat :s
next
identifier
begin
sentence
end
sentence
Replace
&
soft
6
ctags return
0
2
I insert O open P
undo
paste
15
Join lines
word
15
Ctrl M
Op
Cmd
Ins
Move
Find
tag
Code
Extra
Modes
n
i
v
o
c
word
open
redraw
Bottom
screen
cmd line
"next"
f/F/t/T
Ctrl ,
Middle
screen
<
undent
set mark
"prev"
f/F/t/T
16
>
.
indent
repeat
cmd
Ctrl /
2
find
find
Ctrl =
autoformat
Normal
paragraph
paragraph
misc.
misc.
ctags identifier
Ctrl '
16
cur line
Ctrl ;
Ctrl .
2
Ctrl J
Ctrl _
undo line
Top screen
WORD
insert
hard
paste
0
prev mark
man page
identifier
"prev"
find
find
"next"
Ctrl I
Ctrl \
0
"
register
'
goto mark
goto col#
16 The search direction is relative; next is the initial direction, previous is the opposite direction. n ; repeat same initial direction find. N , repeat opposite initial direction find. Note: ; , only searches cursor line, n N searches buffer.
(
8
8
half page
Ctrl H
9,16
half page
A append
:suspend
$
3
Ctrl ^
Legend:
Ctrl 4
Caps
Ctrl 3
1
14
Tab
Ctrl @
http:/michael.PeopleOfHonorOnly.com/vim/
Ctrl 1
Copyleft 2011
Esc
:buffer #
:buffers list
:new blank file/buffer
:bn next file
:bp prev file
:bd close file
:bd! force close
:set lines=#
:set columns=#
:winpos # #
GUI
Windows
:help windows
^w or :wincmd
w!
c!
n!
s!
v!
o!
=!
h!
j!
k!
l!
!
:sp
:switch to next
:close!
:new
:split horz.
horz.
:vsplit vertical
:only maximize
all same size
move to win
move to win
move to win
move to win
[<filename>]
File / Directory
:Explore or :e .
:set browsedir=
one of buffer last