Alternatives for reopening buffers from last session in VIM?

会有一股神秘感。 提交于 2019-12-19 09:57:01

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/16670786/alternatives-for-reopening-buffers-from-last-session-in-vim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!