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
{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:
open a file;
opening NERDTree;
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.
The text was updated successfully, but these errors were encountered:
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.
In the Readme file:
Command hooks exist in the format: {hook_name}
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:
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.
The text was updated successfully, but these errors were encountered: