Gvim插件管理Vundle


之前關於gvim的博客中提到的很多插件安裝比較繁瑣,這一篇來介紹一下gvim管理插件的插件--vundle的安裝以及使用,讓givm的插件安裝更加的簡單

首先給出vundle的git地址

https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows

1.提前准備

首先我們需要在windows下安裝git,順便說一句git真的比svn好用

window git下載地址如下

https://git-scm.com/download/win

這個版本已經按照博文中說的自帶curl

2.打開git bash

運行如下命令

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

將git克隆到系統當前用戶目錄的.vim文件夾下,一般會是C:/Users/username/.vim/bundle/Vundle.vim

3.打開_vimrc,加入如下配置

"vundle start
set nocompatible " be iMproved, required
filetype off                  " required

" 將Vundle插件的目錄添加到gvim的運行時變量中
set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$USERPROFILE/.vim/bundle/')
" All of your Plugins must be added before the following line
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
call vundle#end()            " required
filetype plugin indent on    " required
"vundle end

4.在

call vundle#end()            " required

 和

call vundle#end()            " required

加入你要安裝的插件,這里我安裝了之前提到到NerdTree

Plugin 'scrooloose/nerdtree'

5.在givm命令模式中運行如下命令

:PluginInstall

安裝成功會提示如下

 

 

6.在_vimrc文件中添加對應的配置就可以使用了

"autocmd vimenter * NERDTree
map <F2> :NERDTreeToggle<CR>
"nerdtree end

7.完成圖,其他插件的安裝大同小異

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM