I want to break down my vimrc in diffrent components. I manage my vim Plugins with Vundle and I want to have one file per plugin that tells vundle to manage it and to set configuration like this:
vundle.vim:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"Plugin in here:
Plugin 'gmarik/Vundle.vim'
call vundle#end()
filetype plugin indent on
"Plugin Options:
and syntastic.vim:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"Plugin in here:
Plugin 'scrooloose/syntastic'
call vundle#end()
filetype plugin indent on
"Plugin Options:
" - Python:
let g:syntastic_python_checkers = ['pylint', 'flake8']
let g:syntastic_aggregate_errors = 1
and so on.
If I now call this vimrc:
source vundle.vim
source syntastic.vim
only the last Plugin shows up in vundles Plugin list, other configurations are read though. I guess, vundle calls the 'vundle#begin()'/'vundle#end()' part only upon call (:PluginXXX) and therefore only returns the content of the file last sourced. How can I solve this problem? Can I use something like
PLUGINS = "Plugin gmarik/vundle"
PLUGINS = $PLUGINS + "Plugin scrooloose/syntastic"
...
and call
vundle#begin()
$PLUGINS
vundle#end()
in my vimrc? If so, what is the syntax for vim variables?