Question

I know :mksession, and I use it, but sometimes, it's too much, it saves too much state, which is a problem, for example, when you update some plugins, and want to close/open VIM to start it in a fresh state, except you want to preserve the state for the current opened files, solely.

Sometimes what :mksession saves conflicts with the new updated configuration, prevents from loading parts of it, etc.

So, what are good alternatives (maybe including plugins) for reopening VIM and loading last buffer list, without that much extra state from :mksession?

Was it helpful?

Solution

I guess I figured what I wanted out going through :h :mksession:

set sessionoptions=blank,buffers,curdir,help,tabpages,winsize

Now mksession saves much less state than the default for sessionoptions:

'sessionoptions' 'ssop':

  • default: blank,buffers,curdir,folds,help,options,tabpages,winsize
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top