免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 827 | 回复: 0
打印 上一主题 下一主题

vi reference [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-31 10:42 |只看该作者 |倒序浏览

       
       
       
       
       
       
       
       
       
               
                        编辑
               
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
               
                       
A
               
               
                       
Append to end of current line
               
       
       
               
                       
i
               
               
                       
Insert before cursor
               
       
       
               
                       
I
               
               
                       
Insert at beginning of line
               
       
       
               
                       
o
               
               
                       
Open line above cursor
               
       
       
               
                       
O
               
               
                       
Open line below cursor
               
       
       
               
                       
ESC
               
               
                       
End of insert mode
               
       
       
               
                       
Ctrl-I
               
               
                       
Insert a tab
               
       
       
               
                       
Ctrl-T
               
               
                       
Move to next tab position
               
       
       
               
                       
Backspace
               
               
                       
Move back one character
               
       
       
               
                       
Ctrl-U
               
               
                       
Delete current line
               
       
       
               
                       
Ctrl-V
               
               
                       
Quote next character
               
       
       
               
                       
Ctrl-W
               
               
                       
Move back one word
               
       
       
               
                       
cw
               
               
                       
Change word
               
       
       
               
                       
cc
               
               
                       
Change line
               
       
       
               
                       
C
               
               
                       
Change from current position to end of line
               
       
       
               
                       
dd
               
               
                       
Delete current line
               
       
       
               
                       
ndd
               
               
                       
Delete n lines
               
       
       
               
                       
D
               
               
                       
Delete remainer of line
               
       
       
               
                       
dw
               
               
                       
Delete word
               
       
       
               
                       
d}
               
               
                       
Delete rest of paragraph
               
       
       
               
                       
d^
               
               
                       
Delete back to start of line
               
       
       
               
                       
c/pat
               
               
                       
Delete up to first occurance of pattern
               
       
       
               
                       
dn
               
               
                       
Delete up to next occurance of pattern
               
       
       
               
                       
dfa
               
               
                       
Delete up to and including a on current
                        line
               
       
       
               
                       
dta
               
               
                       
Delete up to, but not including, a on
                        current line
               
       
       
               
                       
dL
               
               
                       
Delete up to last line on screen
               
       
       
               
                       
dG
               
               
                       
Delete to end of file
               
       
       
               
                       
J
               
               
                       
Join two lines
               
       
       
               
                       
p
               
               
                       
Insert buffer after cursor
               
       
       
               
                       
P
               
               
                       
Insert buffer before cursor
               
       
       
               
                       
rx
               
               
                       
Replace character with x
               
       
       
               
                       
Rtext
               
               
                       
Replace text beginning at cursor
               
       
       
               
                       
s
               
               
                       
Substitute character
               
       
       
               
                       
ns
               
               
                       
Substitute n characters
               
       
       
               
                       
S
               
               
                       
Substitute entire line
               
       
       
               
                       
u
               
               
                       
Undo last change
               
       
       
               
                       
U
               
               
                       
Restore current line
               
       
       
               
                       
x
               
               
                       
Delete current cursor position
               
       
       
               
                       
X
               
               
                       
Delete back one character
               
       
       
               
                       
nX
               
               
                       
Delete previous n characters
               
       
       
               
                       
.
               
               
                       
Repeat last change
               
       
       
               
                       
~
               
               
                       
Reverse case
               
       
       
               
                       
y
               
               
                       
Copy current line to new buffer
               
       
       
               
                       
yy
               
               
                       
Copy current line
               
       
       
               
                       
"xyy
               
               
                       
Copy current line into buffer x
               
       
       
               
                       
"Xd
               
               
                       
Delete and append into buffer x
               
       
       
               
                       
"xp
               
               
                       
Put contents of buffer x
               
       
       
               
                       
y]]
               
               
                       
Copy up to next section heading
               
       
       
               
                       
ye
               
               
                       
Copy to end of word
               
       
光标控制
       
       
       
               
                       
h
               
               
                       
Left
               
       
       
               
                       
j
               
               
                       
Down
               
       
       
               
                       
k
               
               
                       
Up
               
       
       
               
                       
l (or spacebar)
               
               
                       
Right
               
       
       
               
                       
w
               
               
                       
Forward one word
               
       
       
               
                       
b
               
               
                       
Back one word
               
       
       
               
                       
e
               
               
                       
End of word
               
       
       
               
                       
(
               
               
                       
Beginning of current sentence
               
       
       
               
                       
)
               
               
                       
Beginning of next sentence
               
       
       
               
                       
{
               
               
                       
Beginning of current paragraph
               
       
       
               
                       
}
               
               
                       
Beginning of next paragraph
               
       
       
               
                       
[[
               
               
                       
Beginning of current section
               
       
       
               
                       
]]
               
               
                       
Beginning of next section
               
       
       
               
                       
0
               
               
                       
Start of current line
               
       
       
               
                       
$
               
               
                       
End of current line
               
       
       
               
                       
^
               
               
                       
First non-white character of current line
               
       
       
               
                       
+ or RETURN
               
               
                       
First character of next line
               
       
       
               
                       
-
               
               
                       
First character of previous line
               
       
       
               
                       
n |
               
               
                       
character n of current line
               
       
       
               
                       
H
               
               
                       
Top line of current screen
               
       
       
               
                       
M
               
               
                       
Middle line of current screen
               
       
       
               
                       
L
               
               
                       
Last line of current screen
               
       
       
               
                       
nH
               
               
                       
n lines after top line of current screen
               
       
       
               
                       
nL
               
               
                       
n lines before last line of current screen
               
       
       
               
                       
Ctrl-F
               
               
                       
Forward one screen
               
       
       
               
                       
Ctrl-B
               
               
                       
Back one screen
               
       
       
               
                       
Ctrl-D
               
               
                       
Down half a screen
               
       
       
               
                       
Ctrl-U
               
               
                       
Up half a screen
               
       
       
               
                       
Ctrl-E
               
               
                       
Display another line at bottom of screen
               
       
       
               
                       
Ctrl-Y
               
               
                       
Display another line at top of screen
               
       
       
               
                       
z RETURN
               
               
                       
Redraw screen with cursor at top
               
       
       
               
                       
z .
               
               
                       
Redraw screen with cursor in middle
               
       
       
               
                       
z -
               
               
                       
Redraw screen with cursor at bottom
               
       
       
               
                       
Ctrl-L
               
               
                       
Redraw screen without re-positioning
               
       
       
               
                       
Ctrl-R
               
               
                       
Redraw screen without re-positioning
               
       
       
               
                       
/text
               
               
                       
Search for text (forwards)
               
       
       
               
                       
/
               
               
                       
Repeat forward search
               
       
       
               
                       
?text
               
               
                       
Search for text (backwards)
               
       
       
               
                       
?
               
               
                       
Repeat previous search backwards
               
       
       
               
                       
n
               
               
                       
Repeat previous search
               
       
       
               
                       
N
               
               
                       
Repeat previous search, but it opposite direction
               
       
       
               
                       
/text/+n
               
               
                       
Go to line n after text
               
       
       
               
                       
?text?-n
               
               
                       
Go to line n before text
               
       
       
               
                       
%
               
               
                       
Find match of current parenthesis, brace, or
                        bracket.
               
       
       
               
                       
Ctrl-G
               
               
                       
Display line number of cursor
               
       
       
               
                       
nG
               
               
                       
Move cursor to line number n
               
       
       
               
                       
:n
               
               
                       
Move cursor to line number n
               
       
       
               
                       
G
               
               
                       
Move to last line in file
               
       
       
               
                       
                       
               
               
                       
                       
               
       
       
               
                       
                       
               
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
               
                       
                       
               
       
       
               
                        File Handling
                       
               
       
       
               
                       
:w
               
               
                       
Write file
               
       
       
               
                       
:w!
               
               
                       
Write file (ignoring warnings)
               
       
       
               
                       
:w! file
               
               
                       
Overwrite file (ignoring warnings)
               
       
       
               
                       
:wq
               
               
                       
Write file and quit
               
       
       
               
                       
:q
               
               
                       
Quit
               
       
       
               
                       
:q!
               
               
                       
Quit (even if changes not saved)
               
       
       
               
                       
:w file
               
               
                       
Write file as file, leaving original
                        untouched
               
       
       
               
                       
ZZ
               
               
                       
Quit, only writing file if changed
               
       
       
               
                       
:x
               
               
                       
Quit, only writing file if changed
               
       
       
               
                       
:n1,n2w file
               
               
                       
Write lines n1 to n2 to file
               
       
       
               
                       
:n1,n2w >> file
               
               
                       
Append lines n1 to n2 to file
               
       
       
               
                       
:e file2
               
               
                       
Edit file2 (current file becomes alternate
                        file)
               
       
       
               
                       
:e!
               
               
                       
Reload file from disk (revert to previous saved
                        version)
               
       
       
               
                       
:e#
               
               
                       
Edit alternate file
               
       
       
               
                       
%
               
               
                       
Display current filename
               
       
       
               
                       
#
               
               
                       
Display alternate filename
               
       
       
               
                       
:n
               
               
                       
Edit next file
               
       
       
               
                       
:n!
               
               
                       
Edit next file (ignoring warnings)
               
       
       
               
                       
:n files
               
               
                       
Specify new list of files
               
       
       
               
                       
:r file
               
               
                       
Insert file after cursor
               
       
       
               
                       
:r !command
               
               
                       
Run command, and insert output after
                        current line
               
       


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/63726/showart_720270.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP