Create a modified file with vim
Vim Text Editor
Format vim [[/directory/] file name]
Three different modes
Command mode
Input mode (insert mode) input content
Last-line mode save and exit
To hit the corresponding command in the appropriate mode
Command mode press I into input mode (press ESC to return to command mode) press: From command mode to last line mode (press ESC to return to command mode) cannot enter last line mode from input mode
In command mode yy copy the current line p paste (3yy copy from the line where the cursor is three lines)
DD Cut/delete current line P paste (3DD cut or delete cursor after three lines)
U returns the position of the previous operation U
Shift+z Z =wq
Input mode Press "End" key to move cursor to end of line
Press "Home" button in input mode to move the cursor to the beginning of the line
Down PAGE Down
Up PAGE Up
In the last line mode, enter:
Set NU Display line number
Wq Save and exit
X Save and exit
Do not save exit q!
Attention
Create a new file if the file does not exist
Enter Command mode if the file already exists
Vim only the ability to create a text file does not have the ability to create a directory
Vim Edit Command