How to configure Vim as your favorite ide

Source: Internet
Author: User


I have been in contact with vim for some time. I have been using some basic operations of VIM, but the program has not been written much, but I am gradually recovering from the status recently.

To do good, you must first sharpen your tools. As a good programmer, how can I not use my own programming tool! Hey hey, today I am eager to transform my programming tool-vim.

I would like to take this opportunity to summarize and share my vim knowledge.

1. Understand Vim

At the beginning, beginners may not know what Vim is, and are confused by various vim, Vi, gvim, and vim-tiny on the Internet. Next I will explain my understanding of VIM in my own words.

VIM: it is an improved version of vi. Now, both Linux and UNIX have upgraded the old version of VI to VIM. Currently, ivim is generally a version above 7.0.

VI: It can also be seen from the description that VI is the oldest editor. Currently, we generally do not use VI unless in some special cases, many Linux publishers use alias Vi = Vim. In fact, we started Vim by playing VI on the terminal.

Vim-TINY: it is a simplified version of VIM with Fast startup speed (in fact, the CPU speed is almost instant ). Vim in this version is not very recommended, and many excellent Vim functions are provided.

Gvim: it is a graphical Vim that supports more colors and effects (you can consider it if you have time ), vim-gnome, VIM-GTK, and vim-Athena are both gvim. We recommend vim-gnome. But if you want to be cool, you can install vim-Athena, which is said to be cool.

Vim-NOx: Like vim-all in the past, it is a full version of VIM. It also supports various languages and scripts, which I personally recommend.

2. Install Vim

Install VIM:

<span style="font-size:18px;">sudo apt-get install vim</span>

(Recommended) install vim-NOx that supports full multi-language versions:

<span style="font-size:18px;">sudo apt-get install vim-nox</span>

Install gvim on the GUI:

<span style="font-size:18px;">sudo apt-get install gvim</span>

3. Understand the vim configuration file

For Vim, it is divided into system-level configuration files and user-level configuration files.

The system-level configuration file is in/etc/Vim/vimrc. All the settings in this file are valid for the entire Linux system, not for specific users, in other words, each user's vim will follow the Configuration Requirements of this file by default.

The user-level configuration file is in ~ /. Vimrc is usually installed by default. We recommend that you configure the vim environment in this file later.

Corresponding to the following plug-ins installed in ~ /. Vim is also available in the folder where Vim is installed by default. If you do not find it, create it by yourself. Don't be afraid of it for beginners.

4. Knowledge of VIM plug-ins

One of the important reasons why Vim can continue to grow and become increasingly powerful is that Vim is open to support its plug-ins and allows programmers in the world to develop appropriate plug-ins, want to have the smart complementing feature in Vim? Install the plug-in. Do you want to have the SMART index function in Vim? Install the plug-in. Do you want to have the visual directory function in Vim? Or install plug-ins. A wide variety of plug-ins have built Vim into a programming sword in the program world. It is a must-have for all programmers who are eager to pursue their fingertips.

Let's take a look at the necessary plug-ins installed in Vim!

(1). Pathogen

The tool used to manage the vim plug-in is convenient and quick. It is very convenient to install or delete the plug-in.

(2). Command-T

Quickly open files and intelligently search for files

(3). nerdtree

In vim, you can view the current environment in the form of a tree directory, and you can quickly open the required files and open tabs.

(4). tagbar

Intelligent indexing can help you quickly view the source code. You can clearly see various types and functions in the Code. It is an upgraded version of the tarlist plug-in and can better work with nerdtree.

(5). taghighlight

Have you found that Vim highlighted functions are insufficient? Install taghighlight quickly, which will make your program look more perfect.

(6). vim-Powerline

Who knows the enhanced status bar?

(7). supertab

Do you envy vs's smart completion of various functions and class functions? In vim, you can have the same features to help you develop quickly and quickly solve problems by creating a tab.

As for how to install these plug-ins, I believe other friends will write better than me. You can refer to the following article to install these plug-ins:

Http://www.cnblogs.com/chijianqiang/archive/2012/11/06/vim-3.html


5. the configured global chart



I think the current Vim is enough for me to use it for a while, and all the functions are available, so I am not prepared to add some plug-ins, if you are interested, you can add the necessary plug-ins as needed.




How to configure Vim as your favorite ide

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.