The Pathogen,nerdtree,command-t,powerline of Vim plugin

Source: Internet
Author: User
Tags autoload git clone
Pathogen function Description

A plug-in package often has a variety of functions, each file according to the path of vim will be placed in a different directory, the common plug-ins put into the plugin, syntax highlighting plug-ins placed under the syntax, automatic loading plug-ins placed under the AutoLoad, file type Plug-ins placed under Ftplugin, The coded format plugin is placed under indent ... If you are a heavy plugin user, you will find in the. Vim home Directory There will be a bunch of folders, whether you want to install new plug-ins, or want to remove old plug-ins, are very troublesome, you have to find the relevant vim files in each folder.

Pathogen is a plug-in to manage plug-ins, mainly to solve the above problems. Pathogen creates a bundle file under the. Vim directory, and all Plug-ins are managed under that directory. When Vim starts, it automatically executes the Vim script under the folder contained in the Runtimepath (RTP) list, and pathogen loads the plugins in the folder under/vim/bundle in a certain order to RTP, so that when Vim starts, The plug-ins that are managed through pathogen are effective.

After the pathogen, there are only three folders under the Vim folder: AutoLoad, Bundle, and Doc, and the other plugins will be installed under the bundle folder. set up 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 in the. vimrc file: Call Pathogen#infect (). Precautions :

After the new plug-in is installed in the bundle directory, if the plugin contains doc, you need to run it in vim: helptags to generate online help tags. Nerdtree function Description:

Vim is one of the most commonly used plug-ins, can be displayed in the Vim runtime directory and file structure, similar to the textmate to the left of the file browser, but more convenient to operate, you can in hand without leaving the keyboard in the case of fast browsing files, and between files and folders to switch. installation

Enter the. vim/bundle directory; execute git clone git://github.com/scrooloose/nerdtree.git; After the download is complete, a Nerdtree folder will be created under bundle. All relevant plug-ins are under this folder; run in vim: helptags to generate Nerdtree's online help tags.

Instructions for use

Open Vim, enter: Nerdtree, you can exhale the implementation of the VIM command in the current directory file directory.

Nerdtree provides a wealth of keyboard operations to browse and open files, and I'll briefly introduce some of the most commonly used shortcut keys:
o Open the closed file or directory, if it is a file, the cursor appears in the open file; The go effect is the same, but the cursor remains in the file directory, similar to the function of previewing the contents of the file, I and S can split the window horizontally or vertically to open the file, and the front plus G is similar to the function on the "Down" tab; T opens in the Background tab page, p to the upper directory, p to the root directory, k to the first node in the same directory, j to the last node in the same directory; m displays the File system menu (add, delete, move operation);? help; Q Close. command-t function Description

Command-t is a fast file browsing plug-in based on Ruby and C extensions, similar to the textmate go to file (command+t Exhale) feature, or Eclipse's Open Resource (command+shift+r) feature , you can quickly locate and open a file by using a fuzzy match. Install Download the latest VBA files: https://wincent.com/products/command-t; Create a folder in the ~/.vim/bundle directory command-t; Use Vim to open command-t-1.4.vba; execute: Usevimball ~/.vim/bundle/command-t;

Go to Ruby directory to compile C extensions (you need to install Ruby, of course)

  CD ~/.vim/bundle/command-t/ruby/command-t
  Ruby extconf.rb
  make
Instructions for use:

Input: Commandt can enter the file quick positioning function, as shown in the figure:

ctrl+j/k Select Files up and down, select back to open File Ctrl+t tab to open File ctrl+s/v can split window horizontally or vertically open file Ctrl + C exit This mode The plug-in also has a common command: Commandtbuffer, You can browse the file for the buffer and reopen it. Mode of operation ibid.

Attention Matters

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

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

If the MKMF package is not found when you perform the Ruby extconf.rb command, you will need to install the Ruby-dev package and install the commands below Ubuntu: sudo apt-get install Ruby1.8-dev. Powerline function Description:

Powerline is a very beautiful vim of the status bar plug-in, installed after the powerline, Vim will appear at the bottom of an enhanced status bar, when Vim is in normal, INSERT, block and other states, the status bar will render a different color, The status bar also displays the format of the current editing file (uft-8, etc.), the file type (Java, XML, etc.), and the cursor position, and so on, like to install.

As shown in the figure:

installation

Enter the. vim/bundle directory; execute git clone git://github.com/lokaltog/vim-powerline.git;

Set the status bar theme in. vimrc

"Powerline{
 set guifont=powerlinesymbols\ for\ powerline
 set nocompatible
 set t_co=256 let
 g: Powerline_symbols = ' Fancy '
 }

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.