最新版本的neotree在打开文件后,从文件跳回到neotree窗口时此窗口的根目录会发生变化,有时候这个变化很方便,但是在大多时候并不需要它自动切换,这时候,就需要把neo-smart-open变量设置为nil, 这样在切换时就不会发生变化了。
如果使用emacs,就需要在~/.emscs文件中增加
(setq neo-smart-open nil)
这样一行配置。
使用spacemacs 就会更方便,在 ~/.spacemacs文件中 dotspacemacs-configuration-layers
这里增加如下配置:
(neotree :variables
neo-smart-open nil
)
就能很方便的改变neotree行为