标签:
vundle是用于管理vim插件的插件。安装、更新和卸载插件只需修改_vimrc即可。
以下是安装vundle的步骤,前提是已经安装了gvim7.4。(注:gvim不要安装到系统盘,否则没有权限编辑_vimrc文件)
1、下载Git并安装
2、把以下代码复制到新建的文本文档,并命名为curl.cmd,然后放到C:\Program Files\Git\cmd\(根据自己的Git安装目录进行修改)
@rem Do not use "echo off" to not affect any child calls. @setlocal @rem Get the abolute path to the parent directory, which is assumed to be the @rem Git installation root. @for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI @set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH% @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% @if not exist "%HOME%" @set HOME=%USERPROFILE% @curl.exe %*
3、把;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core添加到环境变量系统变量Path中。否则在使用vundle安装插件时会提示git不是内部名外部命令。
4、使用git下载vundle插件。打开Git Bash,进入Vim的安装目录,输入以下命令回车就可以把vundle下载到vimfiles/bundle/Vundle.vim目录下
git clone https://github.com/gmarik/Vundle.vim.git vimfiles/bundle/Vundle.vim
5、在_vimrc中插入以下代码,vundle算是完成了安装和配置
set nocompatible " be iMproved, required filetype off " required set rtp+=$VIM/vimfiles/bundle/Vundle.vim/ let path=‘$VIM/Vimfiles/bundle‘ call vundle#begin(path) Plugin ‘gmarik/Vundle.vim‘ "管理Vundle自身 call vundle#end() filetype plugin indent on
6、配置新的插件,必须在call vundle#begin(path) 和 call vundle#end()之间填写插件路径。
插件配置的路径遵循以下规则:1>二级目录直接加github.com前缀;2>一级目录加github.com/vim-scripts前缀;3>完整路径;4>完整本地路径
1>Plugin ‘gmarik/Vundle.vim‘ => https://github.com/gmarik/Vundle.vim 2>Plugin ‘ctrlp.vim‘ => https://github.com/vim-scripts/ctrlp.vim 3>Plugin ‘git://git.wincent.com/command-t.git‘ 4>Plugin ‘file:///path/from/root/to/plugin‘
7、在vim中输入:PluginInstall回车,vundle就会从github上把配置里的插件下载到vimfiles/bundle/目录中
8、更多有关vundle的使用教程请查看vimfiles/bundle/Vundle.vim/doc/vundle.txt
标签:
原文地址:http://www.cnblogs.com/wldragon/p/4509820.html