Vim 插件自动化管理工具

来源:互联网 发布:穿越星际之淘宝主 编辑:程序博客网 时间:2024/04/30 02:28

          喜欢使用vim的程序员,可能经常会遇到这样的情况就是:当你重新安装Linux操作系统后,需要重新将自己喜欢的Vim插件重新安装一遍;有没有想过存在这样一种工具那就是能够自动化的管理你所需要的vim插件,Vundle实现了你的愿望。通过Vundle你可以方便的管理vim的插件,只要你的系统能链接互联网你就可以一键配置你的Vim环境所需要的插件,对,一键安装就是这么简单,下面介绍一下Vundle的安装使用;

 1.安装vundle

vundle的安装方式为:git clone https://github.com/gmarik/vundle.git ~/vimrc/bundle/vundle

 2.配置vimrc

vimrc配置的如下:

set nocompatible               " be iMproved filetype off                   " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " let Vundle manage Vundle " required!  Bundle 'gmarik/vundle' " My Bundles here: " " original repos on github Bundle 'tpope/vim-fugitive' Bundle 'Lokaltog/vim-easymotion' Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} Bundle 'tpope/vim-rails.git' " vim-scripts repos Bundle 'L9' Bundle 'FuzzyFinder' " non github repos Bundle 'git://git.wincent.com/command-t.git' " ... filetype plugin indent on     " required! " " 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..
注:Bundle命令后列出的就是需要安装的插件,我们可以讲自己喜欢的插件添加上

3.安装自己的插件

自动vim,然后执行:BundleInstall命令或者直接运行vim +BundleInstall  +qall

 

就这样所有你需要的插件就自动的安装上了,再也不会为每次都手动的安装vim插件而感动苦恼了

 

原创粉丝点击