Vim Vundle
本文最后更新于:2024年3月18日 凌晨
Vim Vundle
安装vundle
1
| git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
配置说明
- 插件有三种类型:
- Github上vim-scripts仓库的插件。
- Github上非vim-scripts仓库的插件。
- 不在Github上的插件。
- 对于不同的插件,vundle自动管理和下载插件的时候,有不同的地址填写方法,有如下三类:
- 在Github上vim-scripts用户下的仓库,只需要写出repos(仓库)名称。
- 在Github其他用户下的repos,需要写出"用户名/repos名"
- 不在Github上的插件,需要写出git全路径。
配置vundle插件:
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 44
| set nocompatible filetype off
set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'L9'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'file:///home/gmarik/path/to/plugin'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'ascenator/L9', {'name': 'newL9'}
call vundle#end() filetype plugin indent on
|
安装插件
- 将想要安装的插件,按照地址填写方法,将地址填写在vundle#begin和vundle#end之间就可以。
- 保存之后,有两种方法安装插件。
1 2 3
| :PluginInstall
vim +PluginInstall +qall
|
移除插件
- 编辑
.vimrc
文件移除对应的plugin
- 重新打开vim,输入命令
:PluginClean
其他命令
- 更新插件
:PluginUpdate
- 列出所有插件
:PluginList
- 查找插件
:PluginSearch