The VIM editor uses

Source: Internet
Author: User

Enter VIM

If you want to open or create a new file/home/eagle/main.cpp, enter the statement:

Vim/home/eagle/main.cpp

Move cursor
Key function
0/home Move to the beginning of the line
$/end Move to end of line
+ Move to the beginning of the next line
- Move to the beginning of the previous line
Key function
H Move to the top of the screen line
M Move to the center of the screen line
L Move to the bottom line of the screen
Insert Content
Key function
I Insert before the cursor
A Append after cursor
I Insert at the beginning of a line
A Append at the end of a line
O Open a new row in the next line where the cursor is located insert
O Opens a new row in the position of the cursor at the previous line insert
Exit Vim Save exit

You can choose one of the following three ways:

  • Press ESC, input :wq , enter
  • Press ESC, input :x , enter
  • Press ESC, press SHIFT + ZZ, enter
Normal exit

The prerequisite is: The Open file content has not been changed

Press ESC, input :q , enter

Do not save exit

Press ESC, input :q! , enter

Force exit

Press ESC, input :! , enter

After exiting, there will be a prompt message 请按ENTER或其他命令继续 .

The VIM editor uses

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.