Draft-turn VIM into an IDE

Source: Internet
Author: User

From yesterday afternoon to now has been studying vim, beginner, from the most basic of vim command start to look at. is learned through the vimtutor.

When I see the last chapter, I find the tip of the iceberg in the knowledge and knowledge of Vimtutor, the true power of vim is that programmers can configure it at will, making it easy to use. It is said that the good people are configured to use more easily than the IDE.

After the online look at the configuration of Vim method, there are many articles mentioned with Autocomplpop, Ctags, Omnicppcomplete three things, you can simply say that vim is configured to resemble the IDE environment (although still less than the IDE, But the notes are much more convenient in Notepad.)

Many articles on the web also have a way to configure and use.

Here to tidy up the results of yesterday afternoon to the present, so as not to forget, there is time to detail.

First of all, Autocomplpop, is a. vim file, which is a vim plugin (plugin) file that uses this plugin to automatically prompt and complement in vim.

This hint and complement is based on the word, it does not distinguish what programming language, just look at the words (I am so simple to understand). For example, you wrote a variable called Stu_number,

The next time you want to enter this, vim will be prompted with your input, press ENTER to complete the completion. But Vim does not know what type of variable stu_number is, it only knows that you have entered it before, so you can prompt when you enter it.

Autocomplpop installation method is; 1, download Autocomplpop.vim, 2, move this file to/usr/share/vim/vim74, 3, restart Vim

Second, Ctags is supposed to be a vim-independent thing, and he's not a vim plugin. Ctags's role is to create a Chapter tags table, the table records the function definition, macro definition, etc., so when you see a function (should only be customized), do not know his usage, you can press CTRL +] key to jump to the definition of a function or macro. In addition, Ctags also supports completion, but you must press CTRL + N shortcut key.

Ctags installation method is: Yum install ctags. After the installation is complete, enter the source code directory, execute ctags-r after the directory to generate a tags file, vim is based on this file positioning functions and macros defined.

The use of Omnicppcomplete seems to enable Vim to enter a class or struct, and then enter "." You can prompt for member variables and functions, and you can complete them automatically.

Omnicppcomplete installation method: Download the. zip package and unzip it into the ~/.vim folder.

Just a rough collation of the results of the day, a lot of knowledge has not been thoroughly understood, many ideas are not perfect. In the future use of vim in the process, there is time to detail it

Draft-turn VIM into an 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.