Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternatives for reopening buffers from last session in VIM?

Tags:

vim

usability

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?

like image 746
pepper_chico Avatar asked Oct 20 '25 21:10

pepper_chico


1 Answers

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
like image 77
pepper_chico Avatar answered Oct 25 '25 04:10

pepper_chico



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!