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
Describe the bug
I want to run my custom function open_nvim_tree_no_focus on session restore. I also want to run it when I change directory from within nvim to a new project. So I set that function as my post_restore_cmds and my no_restore_cmds. This works fine in almost all cases. However, when I change directory from within neovim to a new project (i.e. a directory with no saved session), this case is not covered by my current config. Looking at the docs, it seems like no_restore_cmds is only run at VimEnter when no session is restored. If I'm not mistaken, VimEnter is only run when opening nvim, not on cwd.
To Reproduce
Steps to reproduce the behavior:
set a function under no_restore_cmds
open nvim
cd to a directory with no session saved
Notice that your function has not been run
Expected behavior
I'm not sure if this behaviour should be changed in no_restore_cmds as that would be a breaking change. I'm just wondering what would be the best way to configure this behaviour? I will probably just put my function call open_nvim_tree_no_focus in my post_cwd_changed_cmds - as that function should be ok to be called twice in some cases.
The text was updated successfully, but these errors were encountered:
Describe the bug
I want to run my custom function
open_nvim_tree_no_focus
on session restore. I also want to run it when I change directory from within nvim to a new project. So I set that function as mypost_restore_cmds
and myno_restore_cmds
. This works fine in almost all cases. However, when I change directory from within neovim to a new project (i.e. a directory with no saved session), this case is not covered by my current config. Looking at the docs, it seems like no_restore_cmds is only run at VimEnter when no session is restored. If I'm not mistaken, VimEnter is only run when opening nvim, not on cwd.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'm not sure if this behaviour should be changed in no_restore_cmds as that would be a breaking change. I'm just wondering what would be the best way to configure this behaviour? I will probably just put my function call
open_nvim_tree_no_focus
in mypost_cwd_changed_cmds
- as that function should be ok to be called twice in some cases.The text was updated successfully, but these errors were encountered: