vim:配置vundle插件
前言
以前,安装vim插件,需要自己从网上拷贝插件到vim的plugin目录下,现在找到了一个vundle插件,相当于一个包管理器,可以自动从网上下载需要的插件。
正文
第一步,按照下面的方式下载vundle插件:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
第二步,像下面这样配置.vimrc配置文件。
下面的摘抄摘自这个插件github的文档,做了一些中文备注,引号开始的是注释,Plugin开始的是要安装的插件。
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
参考
posted on 2019-12-15 17:06 chaiyu2002 阅读(133) 评论(0) 编辑 收藏 举报