Vim keyboard layout

Source: Internet
Author: User

But for beginners, Vim is a very cool tool, because it has a variety of use environments and the keyboard operations are complex and hard to remember. But once you have mastered the basic use of Vim, you will immediately like it, and your work efficiency will be greatly improved. After you start Vim, the normal mode is enabled by default. You can move the cursor on the keyboard, copy and paste the cursor, and perform other basic operations. The keyboard layout is as follows:K ++ h ++ hover (move the cursor to the left), l (move the cursor to the right ), k (move the cursor up), j (move the cursor down) Note: The lower case is used here!Yy (copy the current row) p (paste to the current row) P (paste to the current row)V (specify the start of selection, use the direction key or hlkj navigation key to specify the end position) y (copy selected text) p (paste)Dd (delete the current row) x (delete the character after the cursor)R (enter the replacement mode by r and enter one character to implement the replacement function) R (Multi-character replacement can be implemented)U (undo the previous operation)Press enter (next line) ^ (jump to the beginning of the line) $ (jump to the end of the line) {(jump to the beginning of the line)} (jump to the end of the line) <(left indent)> (Right indent) gg (jump to the first part of the file) G (jump to the end of the file) Here is a small tip: using the number key can improve your efficiency, for example, press 4 and press enter (four rows can be jumped down) for 4 hours to move the cursor four characters to the left. After you press A, a, I, and I, Vim enters the editing mode: A (insert character at the end of the row) a (insert character after the cursor) s (delete the current character from the cursor to enter the editing mode) S (delete the current row to enter the editing mode) to enter and edit the text! (You can use the upper, lower, and lower buttons on the keyboard to move the cursor.) Enter edit mode and Press ESC to return to normal mode! In normal mode, press: The key will enter the command mode. At this time, you can enter the corresponding command below to implement different functions. Common commands are as follows::/Install): W (SAVE): q (release): e (Open File): h (HELP): q! (Exit and do not save): wq (exit and save): x (Release and save): Set number (which can be used to display row numbers): set all (which can be viewed as the function option)

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.