Enter the command vi filename: Open or create a file, set the cursor on the first line of the first line VI N filename: Open the file, and place the cursor in the first line of the first VI filename: Open the file, and place the cursor The last line, the first VI / PATTERN FileName: Open the file and place the cursor in the first string of Pattern Match Vi -r FileName: The system crashes when the last VI editor, restore FileNamevi FileName .... FileName: Open multiple files, edit
Move the cursor class command h: Cursor left shift a character L: Cursor right shift a character Space: Cursor right shift a character backspace: Cursor left shift a character k or Ctrl P: cursor to move a row J or CTRL N: cursor Move a row ENTER: Move a row of W or W: Cursor right shift one word to the head B or B: Cursor left shift one word to the header E or E: Cursor right shift one word J to the word): Cursor moves to The tail (: cursor moved to the beginning}: The cursor is moved to the beginning of the paragraph {: the cursor is moved to the end NG: cursor to the N-line N : cursor down N-line N-line N-line N-line N $: The cursor is moved to the n-row h: cursor moved to the screen top line M: cursor moved to the screen L: cursor moved to the screen last line 0: (Note is a number zero) cursor moved to the current line $: Cursor to move to Current
Screen roll class command Ctrl u: Topping half screen Ctrl D: Take the file tail, half-screen Ctrl f: Tailing the file Ctrl b; send a screen NZ to the file: Rolling the NZ The top of the screen is not specified, and the current row is rolled to the top of the screen. Insert text class command i: In the cursor before I: in the current list A: Cursor after the cursor, A: in the current line O: newly opened in the current line O: newly opened on the current line R: Replace the current character R: Replace the current character and the following characters until pressing the ESC key S: starts from the current cursor location, replacing the specified number of characters S: Delete the specified number of rows, and replaced NCW in the input text or NCW: Modify the specified number of words NCC: Modify the specified number of rows to delete the NDW or NDW: Delete the cursor start and the N-1 word do: Delement to the lead D $: Delete to the end NDD: Delete the current Row and after the N-1 line X or X: Delete a character, X delete the cursor, and the X deletes the ctrl u: The text search input in the input mode and the replacement command / pattern: start from the cursor Search Pattern? Pattern: Pattern? Pattern: Search Patternn from the start of the cursor: Repeat the last search command in the same direction N: Repeat the last search command in the reverse direction: S / P1 / P2 / g: Will it in the current line All P1 is replaced by P2: N1, N2S / P1 / P2 / G: Use all P1 in the ninth to N2 rows to replace: g / p1 / s // p2 / g: use all P1 in the file P2 replace