You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case that doesn't seem too unusual that would be incredibly useful to myself: usually, I don't want to make a default.vim session in any directory I happen to open vim in, otherwise I litter my clean directories with sessions from random times I needed vim open. On the other hand, if I have been using sessions (e.g. default.vim exists) I would like the autosave functionality to be "yes" so that when I quit, default.vim reflects the state of vim before exiting.
In essence, a fourth option of "ifexists", which acts like "no" if there isn't a default.vim in the current directory, and "yes" if there is one. This way, I don't litter my drive with sessions files, but get the autosave functionality where I have explicitly called SaveSession before.
~ Jonathan Martin
The text was updated successfully, but these errors were encountered:
I never intended the session plug-in to be used to store session scripts all over the filesystem :-). The guiding principle was that you would have one directory where all uniquely named session scripts would be stored. Nevertheless I understand that people do this, and that's fine of course, but I'm not going to further compromise the basic design of the plug-in to accomodate this.
Having said all that, I think the plug-in should already be flexible enough to accomodate this use case. Please try adding the fragment of Vim script code given below to your ~/.vimrc script:
I'm closing this issue now because the code given above should enable your use case without changes to the plug-in. If it doesn't work, feel free to reopen this issue.
I have a use case that doesn't seem too unusual that would be incredibly useful to myself: usually, I don't want to make a default.vim session in any directory I happen to open vim in, otherwise I litter my clean directories with sessions from random times I needed vim open. On the other hand, if I have been using sessions (e.g. default.vim exists) I would like the autosave functionality to be "yes" so that when I quit, default.vim reflects the state of vim before exiting.
In essence, a fourth option of "ifexists", which acts like "no" if there isn't a default.vim in the current directory, and "yes" if there is one. This way, I don't litter my drive with sessions files, but get the autosave functionality where I have explicitly called SaveSession before.
~ Jonathan Martin
The text was updated successfully, but these errors were encountered: