手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网站运营>建站经验>列表

how to use VI editor

来源:互联网 作者:west263.com 时间:2008-04-16
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!
Move forward to the beginning of a word, skipping over punctuation.
b
Move the cursor back one word. If the cursor is in the middle of a word, move the cursor to the first character of that word.
e
Move the cursor forward one word. If the cursor is in the middle of a word, move the cursor to the last character of that word.
h
Move the cursor to the left one character position.
j
Move the cursor down one line.
k
Move the cursor up one line.
l
Move the cursor to the right one character position.
w
Move the cursor forward one word. If the cursor is in the middle of a word, move the cursor to the first character of the next word.

Moving the Cursor Around the Screen

^E
Scroll forwards one line. A count scrolls that many lines.
^Y
Scroll backwards one line. A count scrolls that many lines.
z
Redraw the screen with the following options. "z<return>" puts the current line on the top of the screen; "z." puts the current line on the center of the screen; and "z-" puts the current line on the bottom of the screen. If you specify a count before the 'z' command, it changes the current line to the line specified. For example, "16z." puts line 16 on the center of the screen.

Replacing Text

C
Change to the end of the line from the current cursor position.
R
Replace characters on the screen with a set of characters entered, ending with the Escape key.
S
Change an entire line.
c
Change until . "cc" changes the current line. A count changes that many lines.
r
Replace one character under the cursor. Specify a count to replace a number of characters.
s
Substitute one character under the cursor, and go into insert mode. Specify a count to substitute a number of characters. A dollar sign ($) will be put at the last character to be substituted.

Searching for Text or Characters

,
Repeat the last f, F, t or T command in the reverse direction.
/
Search the file downwards for the string specified after the /.
;
Repeat the last f, F, t or T command.
?
Search the file upwards for the string specified after the ?.
F
Search the current line backwards for the character specified after the 'F' command. If found, move the cursor to the position.
N
Repeat the last search given by '/' or '?', except in the reverse direction.
T
Search the current line backwards for the character specified after the 'T' command, and move to the column after the if it's found.
f
Search the current line for the character specified after the 'f' command. If found, move the cursor to the position.
n
Repeat last search given by '/' or '?'.
t
Search the current line for the character specified after the 't' command, and move to the column before the character if it's found.

Manipulating Character/Line Formatting

~
Switch the case of the character under the cursor.
<
Shift the lines up to where to the left by one shiftwidth. "<<" shifts the current line to the left, and can be specified with a count.

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!