Closed ghost closed 9 years ago
I ended up hooking up, to the VimLeave event, a .cmd file that runs a PowerShell script that extracts all "args ...." lines. Slows down closing gvim slightly, and I am concerned there is no guarantee that my VimLeave handler will be called after"SaveSession default", but so far it is working as expected.
The heart of problem seems to be that vim-session (or perhaps it is the native mksession?) doesn't take the most direct route and save a list of loaded buffers when SaveSession is called.
The problem I was trying to solve was buffers that were opened during the session, but had been closed before the session was saved. Unfortunately, my stop-gap had the undesirable side-effect of removing buffers that had been opened during the session and were still open when SaveSession is called.
Win7/Win8, gvim 7.4. I use "gvim --remote-silent" regularly.
Narrative:
gvim --remote-silent test1.vim
gvim --remote-silent test2.vim
:bd
SaveSession test3
badd +1 ~\vimfiles\sessions\test1.vim
args test2.vim
So, the question: Is there any way to suppress the 'args' line when saving a session?
(Looking into sessionoptions, I didn't see any clear way to do it.)
Thanks --