I only recently realized that I have a
vimx binary installed that allows me to switch from terminal mode to gui mode with the
:gui command. This is nice but it has complicated my configuration somewhat, because there are some settings that I want to be different depending on whether I am running in terminal mode or not.
Is there a way to run a set of commands when switching from terminal mode to gui mode (and back again, if that's possible)?