vim Vundle

示例

Vundle是Vim的插件管理器。

安装Vundle

(完整的安装详细信息可在Vundle快速入门中找到)

  1. 安装Git并将Vundle克隆到~/.vim/bundle/Vundle.vim。

  2. 通过在您的顶部添加以下内容来配置插件,.vimrc根据需要添加或删除插件(列表中的插件仅用于说明目的)

     set nocompatible              " be iMproved, required
    filetype off                  " required
    " set the runtime path to include Vundle and initialize
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    " alternatively, pass a path where Vundle should install plugins
    "call vundle#begin('~/some/path/here')
    " let Vundle manage Vundle, required
    Plugin 'VundleVim/Vundle.vim'
    " All of your Plugins must be added before the following line
    call vundle#end()            " required
    filetype plugin indent on    " required
    " To ignore plugin indent changes, instead use:
    "filetype plugin on
    "place non-Plugin stuff after this line
  3. 安装插件:通过启动Vim并运行:PluginInstall。

支持的插件格式

以下是支持的不同格式的示例。将插件命令保持在vundle#begin和之间vundle#end。

插件位置用法
GitHub上的插件Plugin 'tpope/vim-fugitive'
来自http://vim-scripts.org/vim/scripts.html的插件Plugin 'L9'
Git插件未托管在GitHub上Plugin 'git://git.wincent.com/command-t.git'
您本地计算机上的git repos(即在使用自己的插件时)Plugin 'file:///home/gmarik/path/to/plugin'
sparkup vim脚本位于此repo的子目录中,称为vim。传递路径以正确设置运行时路径。Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
如果您已经在其他地方安装了其他版本,请安装L9并避免命名冲突。Plugin 'ascenator/L9', {'name': 'newL9'}

例如,在群集头节点上的共享帐户上工作可能会从按.vim目录使用磁盘的角度提出问题。有几个占用大量磁盘空间的软件包,例如YCM。因此,请Vundle明智地选择插件目录,并通过设置非常容易地进行选择rtp。而且,如果您打算安装任何vim插件,请不要直接git clone在bundle目录中执行。使用Vundle方式。