Vim User Guide in Ubuntu

Source: Internet
Author: User
Vim User Guide in Ubuntu


 

ESC: This is one of the omnipotent function keys in Vim. Basically, pressing this key at any time can return the normal state of vim.

I: In normal state, you can press I to enter the "insert" Edit state. At this time, press the direction key to move the cursor, enter the character where you want to enter, delete the character with the Del key, and then exit the normal state with ESC.

YY (yny): In normal state, move the cursor to the text of a line to be copied with the direction key, and press y twice to copy the line. If you want to copy n rows in this row, yny is used. For example, if you copy five rows, Y5Y is used.

P: After copying, move the cursor to the place to be pasted and press p.

D: In contrast to the above, pressing D is to delete the current row.

X: In normal mode, pressing X is the character that deletes the current position of the cursor, and the Chinese character is the entire Chinese character.

: WQ! : In normal mode, enter ":" to enter the command State. In this state, Q indicates to exit, and W indicates to save ,! Indicates force. For example, if you discard the modification, it is: Q !, Force save and exit: WQ !.

 

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.