vim 插件管理器 Vundle 简易教程

2019-02-27  本文已影响0人  Apolo_Du
Life is short, you need vim

前言:

vundle

安装 vundle

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

使用 vundle 安装vim插件

set nocompatible " be iMproved, required
filetype off " required



" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vimcall 
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
 Plugin 'tpope/vim-surround'

:PluginInstall
// 或
:PluginUpdate

结语😁

至此, 我们就成功地通过 Vundle 添加了一个 vim 插件, 如果要使用其他的 vim 插件管理器 (例如 vim-plug) 来管理 vim 创建, 同样需要进行上文中的类型配置, 具体的操作请参考相应的 github repo.

上一篇 下一篇

猜你喜欢

热点阅读