Vim Study Notes (1)

Source: Internet
Author: User

I saw an article about Vim two days ago, which was very exciting. Before that, I heard about Vim. Of course, for me, it has always been a legendary "God" editor.

Learning Vim seems to really be something to learn. It is too simple and not as easy to use as word and VS, but it is just what makes it powerful, its functions are not displayed on the interface, but need to be operated by keyboard commands. Because I am using a Windows system, gvim is used in the software environment, and the Windows version of VIM should be slightly different.

I will not do anything about the copy tutorial. Let's just talk about my understanding. Vim's three modes: Normal Mode (command mode) and insert mode (insert mode) visual mode (display mode), as if the common command and insert mode are two, the insert mode is like the simplest notepad, used to input text, the command mode is mostly used to replace the mouse operation (in this case, forgetting the Mouse seems to be a good choice). In command mode, press I to enter the insert mode, in insert mode, Press ESC to return to command mode.

Then there is the movement of the cursor. When there is no mouse, it is generally done with the four arrow keys of the top, bottom, and left. No no, this is not the case in Vim, because if you use the mouse and the right hand to leave the keyboard, it takes time. If you use the direction key, the right hand also needs to leave the keyboard (at least temporarily), and moving and locating will be involved when leaving the keyboard, so it will be inefficient. Therefore, the first design in VIM that I admire is here. In command mode, the hjkl four keys can be used to move the cursor from the left to the right (er, although I am not very used to it now), I believe that if you are skilled, this will definitely greatly improve the efficiency of moving the cursor.

When moving the cursor with hjkl, there is a special situation: "When you edit your email or other text with paragraphs, you may find that using the direction keys is different from what you expected. Sometimes you may skip many rows at a time. This is because your paragraph is a long line in Vim's view. In this case, you can type a G before H, J, K, or l, so that Vim will move as you wish on the screen ." In this case, I have not conducted a specific experiment, so I copied it directly.

 

References:

Http://baike.baidu.com/view/113188.htm

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.