window10+gvim.zip配置vundle插件管理器

本文详细介绍如何安装配置vim编辑器及其插件管理器vundle,包括下载安装vim与git,设置环境变量,安装并配置vundle等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.下载vim,看这篇

https://my.oschina.net/bysu/blog/852786

2.下载git,安装

http://download.youkuaiyun.com/download/u010668495/9231643

或者官方下载地址:https://git-for-windows.github.io/,这个比较慢

打开cmd,输入 git --version,出现版本号,即是成功。

3.在git安装目录下的cmd文件夹(如果安装的时候没有加入环境变量path中,需要手动加入)中创建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 %*

在cmd中输入,curl -version,不出现没有curl命令之类的提示,即为成功

4.从git中下载vundle到vim安装目录的vimfiles文件夹中

git clone https://github.com/gmarik/vundle "D:\Program Files\Vim\vimfiles\bundle\vundle" 

此过程若下载到一半出现失败,多试几次即可

5.到“vim安装目录\vimfiles\bundle\Vundle.vim\test”

中把vimrc文件替换vim目录中原来的_vimrc配置文件,并把vimrc重命名为_vimrc。记事本打开替换后的_vimrc文件。

"exec 'set rtp^='.bundle_dir.'Vundle.vim/'
"call vundle#rc(bundle_dir)

替换为

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

6.用gvim打开任意文件,如果不自动下载,可以按esc键,输入VundleInstall即可

 

注意:以上配置可能每次一打开gvim,都会vundle自动下载,很是烦人,参考下面代码段在_vimrc中加入相关代码。

let hasVundle=1  "在_vimrc文件开头加上这个
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
    echo "Installing Vundle..."
    echo ""
    silent !mkdir -p ~/.vim/bundle
    silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle
    let hasVundle=0
endif

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()


这里配置你的插件列表xxx

if hasVundle == 0 "在_vimrc文件结尾加上:从这里到结束的这段
    echo "Installing Plugins, please ignore key map error messages"
    echo ""
    :PluginInstall
endif

参考:

http://blog.youkuaiyun.com/myloveqingmu/article/details/52518563

https://segmentfault.com/q/1010000006858045?_ea=1155123

 

 

 

转载于:https://my.oschina.net/bysu/blog/853828

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值