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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top