Installing the VIM Management plugin pathogen

Source: Internet
Author: User
Tags autoload mkdir git clone

1. Download Pathogen and install

Pathogen's download address is: Https://github.com/tpope/vim-pathogen


Create a . Vim under ~ and then create bundles under. Vim AutoLoad


# CD ~

# mkdir. Vim

# mkdir. Vim/bundle

# mkdir. Vim/autoload



Bundle is the autoload that holds the vim plug-in is to store the pathogen.

# CD ~/.vim/autoload


# wget Https://github.com/tpope/vim-pathogen



Can be extracted directly after download. The pathogen plugin only has a single script, so the installation is to put it in the current user's ~/.vim/autoload directory.

That is, copy the extracted AutoLoad directory together with the Pathogen.vim plugin inside the ~/.vim/directory.




2. Enable Pathogen

To enable pathogen, you will also need to add the following sentence in the ~/.VIMRC file, anywhere before filetype plugin indent on:

# Call Pathogen#infect ()



Need to explain, the plug-in can not be placed in the/usr/share/vim/vim73/directory, and can only be placed in the ~/.vim/directory. To enable pathogen, you can only modify the ~/.VIMRC, not the/ETC/VIMRC (Ubuntu generally only needs to modify the ~/.VIMRC. If you are using fedora, you will need to modify the/ETC/VIMRC file if you want to make the plug-in or VIM configuration effective when you open vim as root.

If there is no ~/.VIMRC file, create the file and copy the following to the file:
Call Pathogen#infect () syntax on filetype plugin indent on


3, install the new plug- in


Installing Nerdtree

For example, to download the install Nerdtree plugin, simply go to the ~/.vim/bundle/directory and execute the following command:

git clone http://github.com/scrooloose/nerdtree.git


After the download is complete, you will see a new directory in the ~/.vim/bundle/directory: Nerdtree

Ok. The Nerdtree plugin is already installed. You can see that this approach is much simpler than the traditional Vim plug-in installation method.

and to uninstall the plug-in is also very simple, just need to delete the Nerdtree directory in the ~/.vim/bundle/directory, neat.

To update the plugin to the latest version, simply go to the directory ~/.vim/bundle/nerdtree/and execute the following command:

Tagbar can be used as an alternative to TagList, execute the installation command in the ~/.vim/bundle/directory as follows:

git clone https://github.com/majutsushi/tagbar.git




You can also set shortcut keys in the VIMRC file later:

Nmap <F4>:tagbartoggle<cr> "set shortcut key let G:tagbar_width = 40" Sets the width by default to Autocmd Vimenter * nested: Call Tagbar#autoopen (1) "Open vim automatically when open tagbarlet G:tagbar_left = 1" On the left "let G:tagbar_right = 1" On the right side


The purpose of the Supertab plugin is to enable the TAB key on the keyboard to have a quicker auto-completion and contextual hints. Download and install the plugin in the ~/.vim/bundle/directory


git clone https://github.com/ervandew/supertab.git





Use pathogen to configure VIM syntax highlighting

Vim itself can set the keyword highlighting, but unable to set the function name and custom data structure highlighting, you can solve this problem through the Taghighlight plug-in.

First install the Taghighlight plugin and run the following command in the ~/.vim/bundle/directory:


HG Clone Https://bitbucket.org/abudden/taghighlight



Wait a short period of time, waiting for taghighlight download, you can use it.

View Plain Cop

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.