window下安装gvim

来源:互联网 发布:手机贴吧抢二楼软件 编辑:程序博客网 时间:2024/06/13 02:53

1、安装GVIM : D:\tools\Vim 我安装的是 D:\tools\Vim

2、安装vim插件管理工具vundle

(1)、安装git客户端:msysgit:D:\tools\Git
运行下载的安装程序,并安装说明一步一步正确安装即可,需要注意的一点就是PATH环境选择界面;
注意:在 adjusting your PATH environment (调整PATH环境)界面,我们选择第二个 run git from the windows command prompt ;

(2)、配置 curl
在windows下安装curl与msysgit结合非常简单,只需要在git的cmd目录创建文件curl.cmd即可
路径:D:\tools\Git\cmd\curl.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 %*

此时测试是否安装:ctrl+R 打开命令框, cmd 到命令框,分别输入 git –version 和 curl –version 能看到版本号即代 表安装成功

(3)、安装Vundle (Vundle on Windows)
1.命令行输入:git clone https://github.com/gmarik/Vundle.vim.git C:\Program Files (x86)\Vim\vimfiles\bundle\Vundle.vim
或是 git clone https://github.com/gmarik/vundle D:\tools\Vim\vimfiles\bundle\vundle
出现安装过程代表可行(我是用第二个安装成功的)

2.添加一个gvim目录的 环境变量 $VIM ,步骤 :我的电脑->属性->高级系统设置->高级->环境变量->新建        变量名为:VIM   变量值为D:\tools\Vim3.在vim启动设定文件_vimrc添加 bundle的配置 ,vim的启动设定文件 _vimrc 添加内容

filetype off
” 此处规定Vundle的路径
set rtp+=$VIM/vimfiles/bundle/vundle/

call vundle#rc(‘$VIM/vimfiles/bundle/’)
Bundle ‘gmarik/vundle’
filetype plugin indent on

” original repos on github
Bundle ‘mattn/zencoding-vim’
Bundle ‘drmingdrmer/xptemplate’

” vim-scripts repos
Bundle ‘L9’
Bundle ‘FuzzyFinder’
Bundle ‘bufexplorer.zip’
Bundle ‘taglist.vim’
Bundle ‘Mark’
Bundle ‘The-NERD-tree’
Bundle ‘matrix.vim’
Bundle ‘closetag.vim’
Bundle ‘The-NERD-Commenter’
Bundle ‘matchit.zip’
Bundle ‘AutoComplPop’
Bundle ‘jsbeautify’
Bundle ‘YankRing.vim’

filetype plugin indent on ” required!

3、打开gvim 冒号 : 在命令行输入 BundleInstall 此时即可安装好上边 Bundle的插件
若是报错:
Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.

说明不能找到ctags程序,在下边的链接里有官网,下载ctags程序,将其解压放置于 D:\tools\Vim\vimfiles\plugin,
重启gvim 即可正常进入

引用参考链接:用于下载软件或者步骤参考
http://www.huangdc.com/421
http://blog.csdn.net/zhuxiaoyang2000/article/details/8636472
http://blog.csdn.net/david_xtd/article/details/40921401
http://ctags.sourceforge.net/

原创粉丝点击