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
- Create autoload and bundle directories under the. Vim folder ;
- Download pathogen:https://github.com/tpope/vim-pathogen;
- Copy the Vim-pathogen/autoload/pathogen.vim file to the. vim/autoload directory;
- 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
- Enter the . Vim/bundle directory;
- Execute git clone git://github.com/scrooloose/nerdtree.git;
- After the download is completed, there will be a Nerdtree folder under the bundle, and all relevant plugins are in the folder;
- 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
- Download the latest VBA file:https://wincent.com/products/command-t;
- Create folder command-t under the ~/.vim/bundle directory;
- Open command-t-1.4.vba with vim;
- Execution : Usevimball ~/.vim/bundle/command-t;
- 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
- Ruby Extconf.rb
- Make
Instructions for use:
Input: Commandt can enter the file quick location function:
- ctrl+j/k Select File, select and enter to open file
- Ctrl+t opening a file in tab mode
- ctrl+s/v can open a file horizontally or vertically in a split window
- 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
- Enter the . Vim/bundle directory;
- Execute git clone git://github.com/lokaltog/vim-powerline.git;
- Setting the status bar theme in. vimrc
"Powerline{
- Set Guifont=powerlinesymbols\ for\ Powerline
- Set nocompatible
- Set t_co=256
- Let G:powerline_symbols = ' fancy '
- "}
Vim Plugin Management-pathogen