Reputation: 110502
I have a plugin place in my vimrc
that looks like this:
" Plugins {{{
call plug#begin('~/.vim/plugged')
" Vim-airline: status-bar for vim: https://github.com/vim-airline/vim-airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
"...
call plug#end()
" }}}
And then I have a bunch of settings for each of the plugins that look something like:
let g:ultisnipseditsplit="tabdo"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
What is the suggested place to put the plugin settings? Should it be, for example, inside the Plugin section? (perhaps a 2nd fold-level down?). Should I create a new fold-section for it (one for Plugins
and one for Plugin-Settings
?), or where is this suggested place to put all the settings?
Upvotes: 0
Views: 470
Reputation: 4703
For plugins, I usually use ~/.vim/after/plugin/config/<name>.vim
. I’m taking advantage of after
being one of the last directories on the runtime path and anything under plugin
directories getting sourced at startup.
For as many plugins as I can, I include a check to avoid configuring them (setting mappings, global vars, etc.) if they are not loaded (i.e., don’t exist). For some this is not possible.
Upvotes: 1
Reputation: 327
It's complete preference. Most people keep them in their vimrc, but if you think it's getting bloated, then sure - extract it to a separate file and you can source it at the bottom of your vimrc like so:
source ~/.plugins.vim
Upvotes: 2