Auto Installing Vundle From Your Vimrc

网友投稿 274 2022-09-14

Auto Installing Vundle From Your Vimrc

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 highlighterBundle 'altercation/vim-colors-solarized' "T-H-E colorschemeBundle '"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-matic​​Entire .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 bundlerlet iCanHazVundle=1let vundle_readme=expand('~/.vim/bundle/vundle/README.md')if !filereadable(vundle_readme)"Installing Vundle.."""silent !mkdir -p ~/.vim/bundle
silent !git clone ~/.vim/bundle/vundle
let iCanHazVundle=0endifset rtp+=~/.vim/bundle/vundle/call vundle#rc()'gmarik/vundle' "Add your bundles here'Syntastic' "uber awesome syntax and errors highlighter'altercation/vim-colors-solarized' "T-H-E colorscheme'"So awesome, it should be illegal "...All your other bundles...if iCanHazVundle == 0"Installing Bundles, please ignore key map error messages""" :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!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:使用GitHub的Webhooks自动部署Ghost主题
下一篇:揭秘培训机构视频号获客逻辑和方式!
相关文章

 发表评论

暂时没有评论,来抢沙发吧~