So for example, i would have a command i could run from a bash script, and all open gvim and vim sessions would reload their config.
This is already the whole question, really, but I will also include my specific issue:
I want to be able to change between a light and a dark theme on the fly from a script. i have these files in ~/:
.vimrc # contains "source ~/.vimrc_theme"
.vimrc_theme # is a symbolic link to either of the following two files
.vimrc_theme_light # contains "colorscheme morning"
.vimrc_theme_dark # contains "colorscheme evening"
and my theme-changer script:
#!/bin/bash
# should be either "light" or "dark"
_mode=${1:-light}
cd \
&& rm .vimrc_theme \
&& ln -s .vimrc_theme_${_mode} .vimrc_theme \
&& touch .vimrc \
&& touch .gvimrc
This question deals with a similar thing. There, one wants to edit .vimrc from inside vim, and then reload it. I want to trigger a reload from the outside.