VIM learn and summarize I. vim open the document: 1. vim document name open document 2.vim+ n document name open document, locate line n 3.vim, enter the vim interface and use the command: e document name open document 2, leave vim: q if... news & nbsp; | & 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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.