当前位置:首页 > 开发 > 开源软件 > 正文

Auto Installing Vundle From Your Vimrc

发表于: 2014-11-18   作者:dcj3sjt126com   来源:转载   浏览次数:
vim
摘要: Vundle allows you to specify in your vimrc what vim plugins you wish to load, and it’ll automatically download (git clone if possible) and enable vim plugins. Vundle can get a name of a plugin as it

Vundle allows you to specify in your vimrc what vim plugins you wish to load, and it’ll automatically download (git clone if possible) and enable vim plugins.

Vundle can get a name of a plugin as it appears in the vim plugin directory, a github “:user/:repo” style string, and even a full git url.

vimrc

1
2
3
Bundle 'Syntastic' "uber awesome syntax and errors highlighter Bundle 'altercation/vim-colors-solarized' "T-H-E colorscheme Bundle 'https://github.com/tpope/vim-fugitive' "So awesome, it should be illegal  

Vundle also updates your vim plugins with a simple command :

Update all your bundles

1
:BundleInstall! 

Vundle is awesome, it saves a lot of the manual work needed in pathogen.

Even more if your installing your vim plugins manually, oy vei.

However, there’s always the fuss of getting it installed on a fresh machine. Adding these lines to your .vimrc, fixes that :

vimrc with vundle-o-maticEntire .vimrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
" Setting up Vundle - the vim plugin bundler  let iCanHazVundle=1  let vundle_readme=expand('~/.vim/bundle/vundle/README.md')  if !filereadable(vundle_readme)  echo "Installing Vundle.."  echo ""  silent !mkdir -p ~/.vim/bundle  silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle  let iCanHazVundle=0  endif  set rtp+=~/.vim/bundle/vundle/  call vundle#rc()  Bundle 'gmarik/vundle'  "Add your bundles here  Bundle 'Syntastic' "uber awesome syntax and errors highlighter  Bundle 'altercation/vim-colors-solarized' "T-H-E colorscheme  Bundle 'https://github.com/tpope/vim-fugitive' "So awesome, it should be illegal   "...All your other bundles...  if iCanHazVundle == 0  echo "Installing Bundles, please ignore key map error messages"  echo ""  :BundleInstall  endif " Setting up Vundle - the vim plugin bundler end 

This will clone vundle and activate it, and install all your bundles (if vundle is not installed).

Disclaimer : Works on my machine ;)

This should work on any *nix machine, although windows 7 should cope with it too (not tested lately)

Enjoy!

 

转自:http://erikzaadi.com/2012/03/19/auto-installing-vundle-from-your-vimrc/

Auto Installing Vundle From Your Vimrc

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
Belkin introduces WeMo light switch, control your household lighting from your Android device
用了vundle管理vim各种插件,就再也不用担心插件混乱的问题了。 vundle项目:https://github.com/gm
最近在玩儿vim,因为考虑到以后迁移方便,所以插件管理用的是vundle,真真十分强大的东西,在配置里
From:http://www.cnblogs.com/killerlegend/p/3892668.html Author:KillerLegend Date:2014.8.5 在
不知是最近是否是因为要召开三 中全会了,现在用goagentFQ常常无法翻成功,出现题名的错误。本来以
Accessing your Model's Data from a Controller In this section, you'll create a new MoviesCont
Instead of installing MSVCR100.dll which you miss as other guys suggest, my solution is to fin
超好用的 vim 配置脚本,哈哈,支持语法高亮、智能缩进和一些不明白的功能!更新方法如下: $ mkdir
超好用的 vim 配置脚本,哈哈,支持语法高亮、智能缩进和一些不明白的功能!更新方法如下: $ mkdir
set encoding=utf-8 set fileencodings=utf-8,chinese,latin-1 if has("win32") set fileencoding=c
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号