Compiler God VIM makeover

Source: Internet
Author: User

I believe that farmers hear two artifact codes, first Emacs, first vim. Everyone knows that e party and V party always quarrel. Unexpectedly, this does not help the noisy. Just everyone has their own reason also applies. Contact with Vim while contacting Emacs. For writers, I think vim is more appropriate.


Below, let us introduce the author's own vim configuration. GitHub Address: https://github.com/tenghui0425/VimScripts


First of all, let's look at the big picture.

This is the VIMRC configuration of the diagram folder situation.



The configuration is mainly the following blocks.

    • Basic configuration. Put it under the. vimrc. For example, a global map. Finally, load a primary configuration file Load_vimrc.vim file.




    • Plug - ins. The author uses the Vundle plugin to manage plugins. There are many plugins for managing plugins. For the base of his. The author has not used, has been fond of vundle, it can manage all the GIT data, update, etc. Very convenient to use. Do not know how to use the words. I believe that Vundle's readme can be understood and given to a portal.

      Https://github.com/gmarik/Vundle.vim

    • Encapsulation plug-in management.

      Assume that a heap of plugins are configured under. vimrc. I'm sure you'll find it uncomfortable. In particular, there are "neat" programmers.

      Of course, the author is also a "neat" programmer, so the management of the plug-in has a more layer of encapsulation. Here are some highlights on how to achieve this.


All packages are in the Load_vimrcs.vim. After loading this file, the final
Loadvimrcs function, this function will be loaded into all the plugins. What about the loading process?
It is necessary to first load the vundle.Then load all the. vimrc suffix files under the Vimrcs folder: VIMRC file to use Vundle to load. Of course. In order to use the configuration to look better, I used the Pluginadd command to redefine the vundle.
In this way, all of the plug-in configurations are separate and look more refreshed.

Just, this will be a lot of files.

Of course. These are all capable of merging, so it's so much more uncomfortable to see the files. It is also possible to synthesize the contents of multiple files into one file.


So what to add plug-ins later? Create a new file under Vimrcs. vimrc as a suffix, it is best to use the name of the plugin as the file name, to facilitate later search.

Then add the name of the plugin by using Pluginadd in front of the file.

The next step is to write a variety of configuration content. Last save use the Bundleinstall command to install the plugin.
Here are a few of the plugins that the authors use very often, because the author is basically C + + development. So the basic is the C + + plug-in. For example,the following: A.vim: Switch between the header file and the source file. C.vim: Very good, very powerful. Must be installed. Self-insertion gaze. Compilation and so on.

Grep.vim: Enhanced grep.
MINIBUFEXPL: Open the file like the Base Editor tag page.

Supertab: Take the initiative to fill the whole.
Unite: Find files.


Vim-expand-region: Check the contents of the quotes and parentheses.
Vim-multiple-cursors: Multiple edits at the same time.


Nerdtree: Folder tree.

The left side of the first big picture.

Tagbar:tag tags, function names, and so on.

The right side of the first big picture.
The use of individual plugins. Be able to participate in their readme.


Copyright notice: This article Bo Master original article. Blog, not reproduced without consent.

Compiler God VIM makeover

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.