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

[BUG] Confusing settings in Readme. #221

Closed
loveFluffy opened this issue May 5, 2023 · 1 comment · Fixed by #222
Closed

[BUG] Confusing settings in Readme. #221

loveFluffy opened this issue May 5, 2023 · 1 comment · Fixed by #222
Assignees
Labels
bug Something isn't working

Comments

@loveFluffy
Copy link

In the Readme file:

Command hooks exist in the format: {hook_name}

{presave}: executes _before a session is saved
{saveextra}: execute _after a session is saved, return string will save to *x.vim, reference :help mks
{postsave}: executes _after a session is saved
{prerestore}: executs _before a session is restored
{postrestore}: executs _after a session is restored
{predelete}: executs _before a session is deleted
{postdelete}: executs _after a session is deleted

For example, {presave} should be literally be {pre_save}. This is so confusing. I tried to set like this:
presave_cmds={"NERDTreeClose"}
this actually won't work and give zero error message... and it should be:
pre_save_cmds={"NERDTreeClose"}

================ Please Correct Those {hook_name}s by Adding a "_" For Each of Them ===========================

Finally I figured out by:

  1. open a file;
  2. opening NERDTree;
  3. run :SessionSave;
    then I found the NERDTree is still open. It has be known that the NERDTree won't be saved by auto-session. If you keep it on before :SessionSave, you will get errors when you try to :SessionRestore since auto-session can't restore the NERDTree. ( see details here: File tree integration with nvim-tree and NERDTree #179) So, it's kind important to automatically close NERDTree before :SessionSave to avoid those annoying error messages.
@loveFluffy loveFluffy added the bug Something isn't working label May 5, 2023
rmagatti added a commit that referenced this issue May 5, 2023
Fix #221 

Not sure what happened to the readme, this didn't used to be like this before. Anywho, this commit fixes it.
@loveFluffy
Copy link
Author

I don't know why, but the tiagofumo/vim-verdtree-syntax-highlight seems don't get along well with auto-session. It will cause errors too at :SessionRestore, I simply keep it away while using auto-session.
Just leave this message in case someone else need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants