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
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




