VIM learn and summarize

Source: Internet
Author: User

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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.