I have my dotfiles synchronized on github which is a current practice.As I use several machines I want to be able to have some part of my configuration not synched on my github repo. To do so I added these lines in my synched .vimrc:let $MYLOCALVIMRC = $HOME . /.local.vimif filereadable($MYLOCALVIMRC)    source $MYLOCALVIMRCendifWhich allows me to add some configuration to ~/.local.vim which isn't synched.This works well but now I'd like to extend that to the plugins: I'd like to have some plugins only loaded on some machines.I'm using vim-plug as my plugin manager and it is not possible to call plug#begin('~/.vim/plugged') and plug#end() several times. Even when changing the directory of plug#begin().The only solution I could imagine was to use a second plugin manager for the local vimrc but it is pretty ugly and I think that it might create some conflicts on the runtime path.TL;DR Is it possible, using a plugin manager, to load some plugins in a .vimrc file and some other plugins in a local configuration file sourced by the first .vimrc?
How to load plugins from my vimrc and from another file?
vimrc;plugin system;plugin vim plug
(I haven't tested this)You could use another local file, that contains exclusively Plug ... commands. The main vimrc would load this, inside the plug#begin - plug#end section. Something like:let $MYLOCALPLUGINS = $HOME . /.local.plugins.vimplug#begin('~/.vim/plugged')Plug '...' load local pluginsif filereadable($MYLOCALPLUGINS)    source $MYLOCALPLUGINSendifPlug '...'plug#end()let $MYLOCALVIMRC = $HOME . /.local.vimif filereadable($MYLOCALVIMRC)    source $MYLOCALVIMRCendifAlternatively (and simpler), just move the $MYLOCALVIMRC creation above plug#begin, and load the extra (locally-used) plugins directly in the main vimrc, on condition that this local vimrc exists:let $MYLOCALVIMRC = $HOME . /.local.vimplug#begin('~/.vim/plugged')Plug '...' load local plugins HEREif filereadable($MYLOCALVIMRC)    Plug '...'    Plug '...'endifPlug '...'plug#end()if filereadable($MYLOCALVIMRC)    source $MYLOCALVIMRCendif