gvim+w7+vundle安装教程

来源:互联网 发布:靠谱的留学中介 知乎 编辑:程序博客网 时间:2024/04/27 15:20

1. 下载安装gvim到D:\Vim(最好选择没有空格的目录方便实惠大方)
官方下载地址:http://www.vim.org/download.php
注意安装时选择full安装:
这里写图片描述

2. 使用vundle插件进行管理前,需要安装git
官方下载地址:https://git-for-windows.github.io/

3. 创建curl.cmd文件,写入如下内容,拷贝到C:\Program Files\Git\cmd文件夹

@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;%git_install_root%\mingw64\bin;%PATH%@rem !!!!!!! For 64bit msysgit, replace 'mingw' above with 'mingw64' !!!!!!!@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%@if not exist "%HOME%" @set HOME=%USERPROFILE%@curl.exe %*

可在cmd中用 curl –version查看是否成功,成功显示版本信息
这里写图片描述

4. 应用git下载vundle,此处注意下载到gvim的安装目录中。
在D:\Vim目录下按下shift+鼠标右键,选择在此处打开命令窗口,进入cmd。
输入命令:git clone https://github.com/VundleVim/Vundle.vim.git vimfiles/bundle/Vundle.vim
这里写图片描述

5. 拷贝vundle官方的配置到_vimrc中,删除原有的_vimrc内容,并修改路径:

set rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()

改为

set rtp+=$VIM/vimfiles/bundle/Vundle.vim/call vundle#begin('$VIM/vimfiles/bundle/')

完整配置为(我只加了一个插件以便测试vundle是否配置正确):

set nocompatible              " be iMproved, requiredfiletype off                  " required" set the runtime path to include Vundle and initializeset rtp+=$VIM/vimfiles/bundle/Vundle.vim/call vundle#begin('$VIM/vimfiles/bundle/')" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'" plugin on GitHub repoPlugin 'altercation/vim-colors-solarized'" All of your Plugins must be added before the following linecall vundle#end()            " requiredfiletype plugin indent on    " required" To ignore plugin indent changes, instead use:"filetype plugin on"" Brief help" :PluginList       - lists configured plugins" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate" :PluginSearch foo - searches for foo; append `!` to refresh local cache" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal"" see :h vundle for more details or wiki for FAQ" Put your non-Plugin stuff after this line

输入VundleInstall哈哈成功了,截图如下:
这里写图片描述

后记:
安装gvim时一定要选full模式。
目录结构最好按照文中的使用,否则出错就不好办了哈哈。
配置完成后的霸气界面^.^(可以参考我的vimrc,注意不要轻易拷贝,这个是linux版,在window下使用需要按第5步修改路径):
这里写图片描述

参考资料:
vundle官方文档: https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows
CSDN博客: http://blog.csdn.net/zfsword/article/details/22800271

0 0