Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing/stale functions/mappings after some plugins get installed or removed #187

Open
iFork opened this issue Sep 5, 2020 · 0 comments

Comments

@iFork
Copy link

iFork commented Sep 5, 2020

Only sessionoptions in my .vimrc are

set sessionoptions-=help
set sessionoptions-=buffers

and per manual we know that vim-session plug-in automatically and unconditionally executes

" Don't persist options and mappings because it can corrupt sessions.
set sessionoptions-=options

I do SaveSession, then uninstall a plugin (e.g. splitjoin or auto-pair, I use vim-plug).
Afterwards, when I OpenSession, there are stale mappings still available which when triggered give errors that they cannot find certain functions (from deleted plugins).
When I install new plugin and OpenSession, mappings/functions of the new plugin become unavailable.
In both cases I need to put together a session from scratch.

Are there other options which I need to remove from sessionoptions or other workarounds to make sessions survive plugin changes?

EDIT: Also after plugin update, plugin may fail to load on startup. For example, after updating coc extension coc-eslint, coc reported that it cannot load ESlint library for a file and related mappings had no effect. Not loading the session solved the issue.
It would save from a headache if, at least, some message from vim-session appeared suggesting that (some) new occurred issue may be due to stale session script and user needs to discard the old session first before going to the issue tracker of the failing plugin :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant