Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make vim vundle install plugin to another path

Tags:

vim

By default, vundle install vim plugins to ~/.vim/bundle/ on linux machine.

How can I make it install plugins to:

~/here/please/vundle/install/all/plugins/
like image 647
Andrew_1510 Avatar asked Mar 21 '12 16:03

Andrew_1510


1 Answers

It should be as simple as passing the target directory to the rc() function when you set up vundle. The implementation of that function explains it well enough if you know a bit of vimscript:

func! vundle#rc(...) abort
  let g:bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1)
  let g:vundle_log = []
  call vundle#config#init()
endf

Instead of just calling

call vundle#rc()

in your vimrc, use

 call vundle#rc("~/here/please/vundle/install/all/plugins")
like image 122
Randy Morris Avatar answered Oct 13 '22 00:10

Randy Morris