vi用法集锦


不好意思 , 是英文的:p
Enter the following subcommands in command mode. You can cancel an incomplete
command by pressing the Esc key. If you need information about the format of vi
subcommands, see "vi General Subcommand Syntax."Left Arrow or h or Ctrl-H Moves the cursor one character to the left.Down Arrow or j or Ctrl-J or Ctrl-N Moves the cursor down one line (it remains
in the same column).Up Arrow or k or Ctrl-P Moves the cursor up one line (it remains in the same
column).Right Arrow or l Moves the cursor one character to the right.Moving within a Line by Character PositionEnter the following subcommands in command mode. You can cancel an incomplete
command by pressing the Esc key. If you need information about the format of vi
subcommands, see "vi General Subcommand Syntax."^ Moves the cursor to the first nonblank character.0 Moves the cursor to the beginning of the line.$ Moves the cursor to the end of the line.fx Moves the cursor to the next x character.Fx Moves the cursor to the last x character.tx Moves the cursor to one column before the next x character.Tx Moves the cursor to one column after the last x character.Repeats the last f, F, t, or T subcommand., Repeats the last f, F, t, or T subcommand in the opposite direction.Number| Moves the cursor to the specifIEd column.Moving to WordsEnter the following subcommands in command mode. If you need information about
the format of vi subcommands, "vi General Subcommand Syntax."w Moves the cursor to the next small word.b Moves the cursor to the previous small word.e Moves the cursor to the next end of a small word.W Moves the cursor to the next big word.B Moves the cursor to the previous big word.E Moves the cursor to the next end of a big word.Moving by Line PositionEnter the following subcommands in command mode. If you need information about
the format of vi subcommands, see "vi General Subcommand Syntax."H Moves the cursor to the top line on the screen.L Moves the cursor to the last line on the screen.M Moves the cursor to the middle line on the screen.Moves the cursor to the next line at its first nonblank character.- Moves the cursor to the previous line at its first nonblank character.Enter Moves the cursor to the next line at its first nonblank character.Moving to Sentences, Paragraphs, or SectionsEnter the following subcommands in command mode. You can cancel an incomplete
subcommand by pressing the Esc key. If you need information about the format of
vi subcommands, see "vi General Subcommand Syntax."( Places the cursor at the beginning of the previous sentence, or the previous
s-expression if you are in LISP mode.) Places the cursor at the beginning of the next sentence, or the next
s-expression if you are in LISP mode.{ Places the cursor at the beginning of the previous paragraph, or at the next
list if you are in LISP mode.} Places the cursor at the beginning of the next paragraph, at the next section
if you are in C mode, or at the next list if you are in LISP mode.]] Places the cursor at the next section, or function if you are in LISP mode.[[ Places the cursor at the previous section, or function if you are in LISP
mode.Moving by Redrawing the ScreenEnter the following subcommands in command mode. You can cancel an incomplete
subcommand by pressing the Esc key. If you need information about the format of
vi subcommands, see "vi General Subcommand Syntax."z Redraws the screen with the current line at the top of the screen.z- Redraws the screen with the current line at the bottom of the screen.z. Redraws the screen with the current line at the center of the screen./Pattern/z- Redraws the screen with the line containing the character string,
specified by the Pattern parameter, at the bottom.Paging and ScrollingEnter the following subcommands in command mode. You can cancel an incomplete
subcommand by pressing the Esc key. If you need information about the format of
vi subcommands, see "vi General Subcommand Syntax."Ctrl-U Scrolls up one-half screen.Ctrl-D Scrolls down one-half screen.Ctrl-F Scrolls forward one screen.Ctrl-B Scrolls backward one screen.Ctrl-E Scrolls the window down one line.Ctrl-Y Scrolls the window up one line.zPages up.z^ Pages down.Searching for PatternsEnter the following subcommands in command mode. You can cancel an incomplete

推荐阅读