【VIM必备】插件vundle——插件的软件库

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

项目托管在github上 https://github.com/gmarik/vundle
其特色在于使用git来管理插件,更新方便,支持搜索,一键更新,从此只需要一个vimrc走天下。

参考安装:

http://yishanhe.net/using-vim-vundle-for-better-plugin-management/

http://www.haiyun.me/archives/vim-vundle.html

如何使用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文件中修改并按照下面例子加入相应需要的语句


" vundle {
set rtp+=~/.vim/bundle/vundle/
" 如果在windows下使用的话,设置为 
" set rtp+=$HOME/.vim/bundle/vundle/
call vundle#rc()
" }
"
" let Vundle manage Vundle
" required! 
Bundle 'gmarik/vundle'

" My Bundles here:
"
" original repos on github
" github上的用户写的插件,使用这种用户名+repo名称的方式
" Bundle 'tpope/vim-fugitive'
" Bundle 'Lokaltog/vim-easymotion'
" Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" Bundle 'tpope/vim-rails.git'
" vim-scripts repos
" vimscripts的repo使用下面的格式,直接是插件名称
Bundle 'taglist.vim'
Bundle 'SuperTab'
Bundle 'vimwiki'
Bundle 'winmanager'
Bundle 'bufexplorer.zip'
Bundle 'The-NERD-tree'
Bundle 'matrix.vim--Yang'
Bundle 'FencView.vim'
Bundle 'Conque-Shell'
Bundle 'Vimpress'
Bundle 'Markdown'
Bundle 'LaTeX-Suite-aka-Vim-LaTeX'
Bundle 'c.vim'
Bundle 'snipMate'

" non github reposo
" 非github的插件,可以直接使用其git地址
" Bundle 'git://git.wincent.com/command-t.git'
" ...

"
"  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
" vundle主要就是上面这个四个命令,例如BundleInstall是全部重新安装,BundleInstall!则是更新
" 一般安装插件的流程为,先BundleSearch一个插件,然后在列表中选中,按i安装
" 安装完之后,在vimrc中,添加Bundle 'XXX',使得bundle能够加载,这个插件,同时如果
" 需要配置这个插件,也是在vimrc中设置即可
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..


 注意,vundle会自动给你下载和管理插件,所以,你只要填上你所需要的插件名称即可。对于不同类型的插件,有不同的地址填写方法。按上面的方法填写完毕就可以了。 填写完成,保存退出后,打开一个vim窗口。在命令模式下输入

             :BundleList    //会显示你vimrc里面填写的所有插件名称

             :BundleInstall  //会自动下载安装或更新你的插件。

             :Bundle....//还有其他的一些命令



例如:我们要安装一些常用的插件可以在其中适当的位子加入以下语句:

" vimscripts的repo使用下面的格式,直接是插件名称
Bundle 'taglist.vim'
Bundle 'SuperTab'
Bundle 'winmanager'
Bundle 'bufexplorer.zip'
Bundle 'The-NERD-tree'
Bundle 'c.vim'

再例如:我们要按住clang_complete插件

可以加入 

Bundle 'Rip-Rip/clang_complete'             //这里只要是github上面挂载的插件都可以有不同的形式





     PS: https://github.com/vim-scripts 和 http://vim-scripts.org/vim/scripts.html 这两个网站上都是vim-scripts的插件,即你只需在vimrc中添加你想要的插件名称即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值