9

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/

1 Answer 1

15

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")
2
  • It works. And I use this: call vundle#rc("$HOME/here/please/vundle/install/all/plugins") -- the $HOME and ~ both expanded to home directory, I found it good to try another when one get strange warning. Mar 24, 2012 at 8:17
  • Added to Vundle FAQ
    – gmarik
    Aug 13, 2013 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.