Vim Plugin Management-pathogen

Source: Internet
Author: User
Tags autoload

Pathogen

Function description

A plug-in package often has a variety of functions, each file according to the path of the vim of the directory will be placed in different directories, the general plug-in into the plugin, the syntax highlighting plug-in syntax, the automatic loading plug-in autoload, file type plug-in placed under the Ftplugin, The encoded format plugin is placed under indent ... If you are a heavy plug-in user, you will find that there will be a lot of folders in the. Vim home directory, whether you want to install a new plugin, or want to delete the old plugin, is very troublesome, you have to find the relevant vim file under each folder.

Pathogen is a plug-in that manages plug-ins that are primarily used to address these issues. Pathogen builds bundle files under the. Vim directory, and all plugins are managed under that directory. When Vim starts, the Vim script in the folder contained in the Runtimepath (RTP) list is automatically executed, and pathogen will load the plugins in the folder under./vim/bundle into RTP in a certain order at startup. So when Vim starts, the plug-in that is managed via pathogen is in effect.

After pathogen, in general . There are only three folders under the Vim folder: AutoLoad, Bundle, and Doc, and the other plugins will be installed under the bundle folder.

Installation

    1. Create autoload and bundle directories under the. Vim folder ;
    2. Download pathogen:https://github.com/tpope/vim-pathogen;
    3. Copy the Vim-pathogen/autoload/pathogen.vim file to the. vim/autoload directory;
    4. Add the following code to the. VIMRC file: Callpathogen#infect ().

Precautions:

After installing the new plugin into the bundle directory, if the plugin contains doc, you need to run it in vim : Helptags to generate online help tags.

Nerdtree

Function Description:

Nerdtree is one of the most commonly used plug-ins of vim, it can display the directory and file structure in vim runtime, similar to the file browser on the left side of TextMate, but it is more convenient to operate, you can quickly browse the files without leaving the keyboard, and switch between files and folders.

Installation

    1. Enter the . Vim/bundle directory;
    2. Execute git clone git://github.com/scrooloose/nerdtree.git;
    3. After the download is completed, there will be a Nerdtree folder under the bundle, and all relevant plugins are in the folder;
    4. Run in vim : Helptags to generate Nerdtree online help tags.

Instructions for use

Open Vim, enter : Nerdtree, you can call out the current directory to perform the VIM command of the file directory.

Nerdtree provides a rich keyboard operation to browse and open files, I briefly introduce some common shortcut keys:

    • o Open the closed file or directory, if it is a file, the cursor appears in the open file;
    • Go effect above, but the cursor remains in the file directory, similar to preview the contents of the file function;
    • I and S can split the window horizontally or vertically to open the file, the front plus g like go function;
    • T opens in the tab page;
    • T opens in the Background tab;
    • p to upper level directory;
    • p to root directory;
    • K to the first node of the same directory;
    • J to the last node in the same directory;
    • m displays the File system menu (add, delete, move operation);
    • Help
    • Q off.

Command-t

Function description

COMMAND-T is a plug-in for fast file browsing based on Ruby and C extensions, similar to the textmate go to file (command+t out) feature, or the Open Resource (command+shift+r) feature of Eclipse , you can quickly locate and open a file with fuzzy matching.

Installation

    1. Download the latest VBA file:https://wincent.com/products/command-t;
    2. Create folder command-t under the ~/.vim/bundle directory;
    3. Open command-t-1.4.vba with vim;
    4. Execution : Usevimball ~/.vim/bundle/command-t;
    5. Go to the Ruby directory to compile the C extension (of course you need to install ruby)
      CD ~/.vim/bundle/command-t/ruby/command-t
    6. Ruby Extconf.rb
    7. Make

Instructions for use:

Input: Commandt can enter the file quick location function:

    1. ctrl+j/k Select File, select and enter to open file
    2. Ctrl+t opening a file in tab mode
    3. ctrl+s/v can open a file horizontally or vertically in a split window
    4. CTRL + C to exit the mode

The plugin also has a common command: Commandtbuffer, you can browse the buffer file and reopen it. Operation is the same as above.

Precautions

The VIM version needs to support Ruby extensions. We can enter in Vim : Ruby 1 Check, if E319:sorry appears , the command is not available in this version will indicate not supported.

If this is the case, we need to compile our own to support the vim of Ruby, it is troublesome to install Vim-nox directly, with Ruby support, the installation command in Ubuntu is as follows:sudo apt-get install Vim-nox.

If the MKMF package is not found when you execute the Ruby extconf.rb command, you will need to install the Ruby-dev package and install the command under Ubuntu as follows:sudo apt-get install Ruby1.8-dev.

Powerline

Function Description:

Powerline is the vim of a very beautiful status bar plug-in, after the installation of Powerline, VIM will appear on the bottom of a enhanced status bar, when vim in normal, INSERT, block, etc., the status bar will be rendered different colors, The status bar also displays the format of the currently edited file (uft-8, etc.), the file type (Java, XML, and so on), and the cursor location, as you like.

Installation

    1. Enter the . Vim/bundle directory;
    2. Execute git clone git://github.com/lokaltog/vim-powerline.git;
    3. Setting the status bar theme in. vimrc
      "Powerline{
    4. Set Guifont=powerlinesymbols\ for\ Powerline
    5. Set nocompatible
    6. Set t_co=256
    7. Let G:powerline_symbols = ' fancy '
    8. "}

Vim Plugin Management-pathogen

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.