Vundle配置文件解析与使用指南

1 篇文章 0 订阅

0.简介

Vundle是Vim Bundle的缩写,是一个Vim插件管理工具。

Vundle allows you to…

  • keep track of and configure your plugins right in the .vimrc
  • install configured plugins (a.k.a. scripts/bundle)
  • update configured plugins
  • search by name all available Vim scripts
  • clean unused plugins up
  • run the above actions in a single keypress with interactive mode

Vundle automatically…

  • manages the runtime path of your installed scripts
  • regenerates help tags after installing and updating

1.安装方法

1.1 从git上拉取项目

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

1.2 将以下的配置命令放在.vimrc文件的最开头。

" 表明不与Vi兼容,因为如果与Vi兼容,很多强大的功能无法使用
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
" running time path 的缩写,即我们到哪里去找插件
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'

" [Vim Markdown插件]
" vim高亮显示Markdown语法
Plugin 'morhetz/gruvbox'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'

" 不同形式的插件支持方式,各种形式的Plugin一定要在begin/end之间
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.

" Github上的插件,直接写账户/项目名就可以
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'

" vim-scriptes网站上插件
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'

" 也是git仓库,但是不是Github上的插件,比如公司内的git仓库
" 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

3.安装

进入Vim,输入命令。

:PluginInstall

在Vim最下边会显示processing等文字即表示在安装。其他命令在上述配置当中的brief help中。

4.官方FAQ

官方FAQ和项目地址见这里。https://github.com/VundleVim/Vundle.vim#docs


本文参考文献亦是:https://github.com/VundleVim/Vundle.vim#docs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值