Ctrl+u: To file the first half screen; Ctrl+d: Half screen to the end of the file; ctrl+f: Flip a screen to the end of the file; Ctrl+b: Turn one screen at the top of the file, ESC: switch from edit mode to command mode, ZZ: Save the changes made by the current file in command mode and Exit VI;: Line number: The cursor jumps to the beginning of the specified line;: $: The cursor jumps to the beginning of the last line; x or x: Deletes one character, x deletes the cursor, and x deletes the cursor; D: Deletes all the characters from the current cursor to the end of the line at the cursor;DD: Delete the cursor line contents ; NDD: Deletes the current row and its subsequent n-1 rows; Nyy: Saves the contents of the current row and its next n rows to the register? In, where? is a letter, n is a number, p: Pastes the contents of the buffer below the current cursor position, and P: Pastes the text action to paste the contents of the buffer above the current cursor position;/string: Text lookup operation, Used to find the contents of the specified string from the current cursor position to the end of the file, and the found string is highlighted; Name: A text lookup operation to find the contents of the specified string from the current cursor position to the head of the file, the found string is highlighted, and the a,bs/f/t: replaces the text action, which is used to change the F string to a T string between lines A and B. where "s/" means the substitution operation; A: Add text after the current character; A: Insert text at the end of the line, I: Insert the literal in the current word match either; O: Insert a blank line after the current row; O: Insert a blank line in front of the current line;: Wq: In command mode, perform a disk exit operation; :w: in command mode, perform disk operation;: w! : In command mode, execute the Force disk operation;: Q: In command mode, execute exit VI operation;: q! : In command mode, perform a forced exit VI operation;: E file name: In command mode, open and edit the file with the specified name;: N: In command mode, if you open multiple files at the same time, continue editing the next file;: F: In command mode, to display the current file name, The line number and the display scale of the line where the cursor is located;:set Number: In command mode, used to display line numbers at the leftmost end;: Set nonumber: In command mode, used to not display line numbers at the leftmost end;
Linux Command vi command file editing