I wanna save the state of a variable (say,
background) such that the state is restored next time I start vim.
More in detail, it should work like this:
- I set
backgroundto either dark or light.
- I open a new instance of VIM. (I may or may not have quit out of the old instance first)
- On startup of the new instance,
backgroundis automatically set to the value set in 1.
I could probably hand-code a command that sets the variable, writes its value to some file, and have the file read on startup. But perhaps there's an easier way to get what I want?