AKSTIANYE

Jul 18, 2018

windows下使用vundle管理gvim插件

1.安装gvim

官网下载地址 http://www.vim.org/download.php

注意安装目录避免空格、中文

安装目录结构如下

1
2
3
4
5
6
vim
|-- .vimrc vim配置文件
|-- vim74 vim目录
| |
|-- vimfiles 其他文件目录,如插件等
| |

配置环境变量

创建一个系统变量 例: VIM = E:\gvim\Vim

path中加入%VIM%\vim74\

2.安装vundle

安装vundle需要gitcurl

此处不介绍git与curl的安装

进入vim安装目录

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

复制vundle官网默认配置替换.vimrc文件内容
https://github.com/VundleVim/Vundle.vim

这里粘一份默认配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
set nocompatible              " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end() " required
filetype 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

替换其中

1
2
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

1
2
set rtp+=$VIM/vimfiles/bundle/vundle.vim/
call vundle#rc('$VIM/vimfiles/bundle/')

即指定vundle的目录

其中如

1
2
3
4
Plugin 'tpope/vim-fugitive'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'file:///home/gmarik/path/to/plugin'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}

是几种配置插件的方式

可自行替换成自己需要的插件

打开gvim后使用
:BundleInstall命令安装插件
:BundleList 查看插件列表
:BundleClean 清理不用的插件

OLDER > < NEWER