The use of VIM in Linux learning

Source: Internet
Author: User

Why should I learn vim?
    • All Unix like systems have their own VI editor
    • Some software's editing interface will automatically adjust the VI
    • As an upgraded version of VI, VIM has the program editing function, but also has the code color highlight, the identification code correctness and so on function

The above advantages lay the absolute position of vim in the Linux system

Two VI use 1 mode to understand

VI has three modes, namely: General mode, edit mode, command mode. Let's get to the bottom three of these patterns.

General mode: is also the default mode, with VI open a file directly into the general mode. In this mode, you can delete characters, delete whole lines, replace characters, copy and paste operations

Edit mode: User vi Open the file into the general mode, when you just press "I i a o o r r" any one of the letters, it will enter the editing mode.

  

When you enter edit mode, the words "INSERT" or "REPLACE" appear in the lower left corner of the document; To exit edit mode, press the ESC key to return to normal mode

Command mode: In general mode, you can enter ":/?" in the command mode with the keyboard, and the cursor moves to the bottom line, waiting for the user to enter the next step. In this mode, users can perform common operations such as reading, saving, bulk substitution, displaying line numbers, exiting the editor, such as ": Set Nu" To display line numbers in a document

  

2 Common key instruction cursor movement

  

  

Copy and paste

  

Search and replace

  

  

Instruction in command mode

  

Instructions in edit mode

  

The use of VIM in Linux learning

Related Article

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.