airblade / vim-rooter

Changes Vim working directory to project root.
MIT License
1.21k stars 72 forks source link

Add 'nested' flag to autocmds #97

Closed exp closed 5 years ago

exp commented 5 years ago

When autocmds currently fire, they don't cascade their actions to later autocmds as nesting is disabled by default.

I've begun using neovim-gtk, and an annoying behaviour is that its browser sidebar fails to change to the project root, meaning every subsequent file I try to open is opened with the wrong relative path.

This is due to the DirChanged event not being fired, as rooter changes directory inside an existing autocmd. Changing the autocmd definitions to permit nesting resolves this issue. DirChanged is fired as expected.

I couldn't find any other discussions regarding 'nested' on the repo, issues or pull requests. I couldn't find an immediate good reason that rooter shouldn't trigger these events either. I've only trivially tested this change locally though and am only a vim amateur.