Vim插件管理器Vundle使用


參考地址:http://www.linuxidc.com/Linux/2012-12/75684.htm

 

Vundle(Vim bundle) 是一個vim的插件管理器。

其Github地址為: https://github.com/gmarik/vundle

如何使用Vundle  (個人使用環境為Ubuntu 12.10)

1. 從Github下載vundle到本地:

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

2. 配置vimrc文件:

如果是使用ubuntu apt安裝的vim,其vimrc一般應該在/etc/vim/目錄下

有些人的vimrc文件可能在個人工作目錄下,為.vimrc文件

在vimrc文件中修改並按照下面例子加入相應需要的語句。

set nocompatible              " be iMproved 
filetype off                  " required!      /**  從這行開始,vimrc配置 **/ 
 
set rtp+=~/.vim/bundle/vundle/ 

call vundle#rc() 
 
" let Vundle manage Vundle 
" required! 
Bundle 'gmarik/vundle' 
 
" My Bundles here:  /* 插件配置格式 */ 
"   
" original repos on github (Github網站上非vim-scripts倉庫的插件,按下面格式填寫) 
Bundle 'tpope/vim-fugitive' 
Bundle 'Lokaltog/vim-easymotion' 
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} 
Bundle 'tpope/vim-rails.git' 
" vim-scripts repos  (vim-scripts倉庫里的,按下面格式填寫) 
Bundle 'L9' 
Bundle 'FuzzyFinder' 
" non github repos  (非上面兩種情況的,按下面格式填寫) 
Bundle 'git://git.wincent.com/command-t.git' 
" ... 
 
filetype plugin indent on    " required!  /** vimrc文件配置結束 **/ 
"                                          /** vundle命令 **/ 
" Brief help 
" :BundleList          - list configured bundles 
" :BundleInstall(!)    - install(update) bundles 
" :BundleSearch(!) foo - search(or refresh cache first) for foo 

" :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles 
"   
" see :h vundle for more details or wiki for FAQ 
" NOTE: comments after Bundle command are not allowed.. 

注意,vundle會自動給你下載和管理插件,所以,你只要填上你所需要的插件名稱即可。對於不同類型的插件,有不同的地址填寫方法。按上面的方法填寫完畢就可以了。

填寫完成,保存退出后,打開一個vim窗口。在命令模式下輸入

:BundleList    //會顯示你vimrc里面填寫的所有插件名稱

:BundleInstall  //會自動下載安裝或更新你的插件。

PS: https://github.com/vim-scripts 和 http://vim-scripts.org/vim/scripts.html 這兩個網站上都是vim-scripts的插件,即你只需在vimrc中添加你想要的插件名稱即可。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM