VIM learn and summarize I. vim open the document: 1. vim document name open document in Normal Mode 2. vim + n document name after opening the document, locate row n 3. vim: after entering the vim interface, run the command: e document name to open document 2. Exit vim: q. If the text is not modified, it will exit. Otherwise, a warning will appear and it cannot be left. : Q! Discard all modifications and forcibly exit. : After wq is saved, it is saved again even if the document has not been modified. : W file name: Save. If the document name is not added, the original document is written. : W saves the file during editing, which is equivalent to ctrl + s: qa or qa in word! Exit vim when multiple documents are opened. A means all. : Sh temporarily exits vim and enters the shell command line. After the command is executed, ctrl + d exits and re-enters vim editing. Continue to edit it under the shell command. Execute ctral + l to clear the screen :! Command temporarily leaves vi to display the result of Executing command in command column mode! Example :! Ls: Execute the shell command during the editing process ls 3. Common commands: set number or: set nu: display the row number of the file in the editing process: set nonumber or: set nonu is opposite to the previous command, do Not Display row number: set ts = 4 set tab stops for text input