auto_save only if there is an open session.
Currently, even if there is no session open, either default session is saved or user is prompted (depending of auto_save = 'yes' or 'prompt'). Is it possible to ignore auto_save if there is no open session?
Use Case: If user goes to a directory and opens a file just to read it, then there is no need to save the session. If user intends to maintain a session for a particular directory (e.g. directory contains a project user is working on) then he can 'SaveSession' once and then auto_save will kick in on every subsequent exit.
Any thoughts???
It's the exactly same thought I have when the very first time when I saw the prompt.
this would be a very good feature :+1:
Currently I'm having the same problem... I really wish there could be some option to disable auto_save only when there was no active session.
Looking on the source code, it looks like this is partially the current behaviour. The xolox#session#auto_save_periodic function will only save if there's some session open (#L478), and the xolox#session#auto_save function will only save the "default" session if there isn't any other saved session AND the g:session_default_overwrite option is not set (#L444).
Anyway, I guess this behaviour could be better documented.
I will be adding my own fix to this branch here https://github.com/dylan-chong/vim-session/commits/session_autosave_only_with_explicit_session