Start learning Vim

Source: Internet
Author: User

One install vim

(1) Before learning vim, it must be to install VIM. Execute sudo apt-get install vim under Ubuntu Terminal.

(2) How do you use VIM to develop C + + and other programs, please install the software and C + + relies on some of the header files and libraries. Execute the sudo apt-get install build-essential under terminal.

two understanding the three basic modes of VIM

When we finish installing an editor, we will definitely open it and then enter something in it, but after you open vim, you want to enter something and find that you have nothing to input, so before you write something, first understand the three basic modes of VIM.

(1) Normal mode

When you start Vim, VIM will be in normal mode. In the normal mode of vim, all keys are function keys, the following is attached to the VIM accelerator distribution map.

(2) Insert mode

In normal mode, press I on the keyboard to type Insert mode (of course, there are other ways, 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, you have entered the VIM insert mode. In insert mode, you are free to enter what you want to enter, just like with 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 portion of a file for deletion, copying, and so on.

Switch between three vim three basic modes (1) Normal <-> Insert

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

In insert mode, press ESC on your keyboard to return to normal mode, and if you are not sure if you are in normal mode, you can press the ESC key multiple times

(2) Noraml <-> Visual

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

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

"Turn from" http://blog.csdn.net/qiurisuixiang/article/details/8890377

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.