歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Vim教程:Vundle管理vim插件

Vim教程:Vundle管理vim插件

日期:2017/2/28 15:51:05   编辑:Linux教程

Vim用得久了,插件也越來越多,如何才能有效地管理這些插件,快速搭建/恢復自己熟悉的工作環境,是每一個使用vim應該思考的問題,vundle的出現使得管理這些插件變得非常方便快捷,趕緊來試試吧。

1 安裝vundle

git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

2 修改.vimrc,添加語句

" For vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
" vim-scripts repos
Bundle 'bash-support.vim'
Bundle 'perl-support.vim'
filetype plugin indent on "

其中語句Bundle後的插件名稱來自於http://vim-scripts.org/vim/scripts.html的Name列

3 安裝插件並測試

打開vim在命令模式下鍵入:BundleInstall開始下載安裝,從log裡可以看出是git clone *.git到~/.vim/下的

4 其它相關命令

更新插件 :BundleInstall!
缷載插件 :BundleClean

Copyright © Linux教程網 All Rights Reserved