[Vim leveling strategy]-start learning Vim

Source: Internet
Author: User
Document directory
  • (2) Insert Mode
  • (3) visual mode
  • (1) normal <-> insert
  • (2) noraml <-> visual

I have learned Vim before, but for various reasons, I have not continued to learn it. In fact, it is not enough perseverance to stick to it. So now Vim can only perform simple operations. Now I want to learn Vim again, and record the learning process, the interesting commands in Vim, and the problems encountered in learning ......

It is painful to start learning vim, because there are too many commands in Vim, but you will soon forget it, so the most effective way is to keep practicing, this may take a long time, so do not expect Vim to be used more efficiently than other editors in a short time.

Well, let's talk about it. Start Vim's learning journey. come on ~


1. Install Vim

(1) install Vim before learning vim. Run sudo apt-Get install Vim on the Ubuntu terminal to install vim.

(2) How do you use Vim to develop C/C ++ and other programs? Please install some header files and libraries on which C/C ++ depends. Run sudo apt-Get install build-essential on the terminal.


2. Understand the three basic modes of VIM

After installing an editor, we will certainly open it and enter something in it. However, after opening vim, you will find that you have not entered anything, so before writing something, let's take a look at the three basic Vim models.

(1) Normal Mode

After you start vim, VIM is in normal mode. In normal mode of VIM, all keys are function keys. The Vim shortcut key distribution chart is attached below.


(2) Insert Mode

In normal mode, press I on the keyboard to type the insert mode (of course there are other methods, such as pressing a, O, O, etc., I is the most common method ), when you see the-insert-font in the lower left corner of VIM, it indicates that you have entered the insert mode of vim. In insert mode, you can enter what you want, just like using other editors ~

(3) visual mode

In normal mode, press the V key on the keyboard to enter visual mode. In visual mode, you can select a part of the file for deletion, copying, and other operations.

Switch between three Vim basic modes (1) normal <-> insert

In normal mode, press I on the keyboard to enter insert mode.

In insert mode, Press ESC on the keyboard to return to normal mode. If you are not sure whether the normal mode is enabled, you can press ESC multiple times.

(2) noraml <-> visual

In normal mode, press V on the keyboard to enter visual mode.

In visual mode, Press ESC on the keyboard to return to normal mode (you can also press V again)

Now, we have completed the preparation project for learning vim and are ready to officially start learning Vim ......

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.