NERDTree: 5 file(s) could not be loaded into the NERD tree
- Category
- [x] Question
- [x] Bug
- [ ] Suggestion
- OS
- [x] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
- Vim
- [x] Vim
- [ ] Neovim
After adding function GGrep I have following error. Is acuring most of the time after calling this function. After this error I am unable to open in Nerdtree node where I was doing GGrep. Really trange behaviour and I don't now how to trouble shoot this? Some ideas?
+1
+1
Have the same issue when trying to use fzf and nerdtree at the same time in neovim
- I experience this problem with after I search file using
:GFilesand open using<C-t>. The nerdtree does not work in the newly opened tab, though it seems to work in the older/first tab. - I use
vimon mac.
Same with vim 8.2.
I found workaround, may be it will help to other people.
Right after intial project or file opening open and close nerdtree.
NERDTree does not load file after FZF was used (vim 8.2 and Linux) Workaround: Use built-in vim explorer netrw.
I have the feeling that this has something to do with autochdir handling… it happened for me after I enabled it during a vim session and used fzf's :Buffers , but there were no problems before.
(I have set autochdir in my .vimrc, but noautochdir it was not set after startup… maybe this is also a hint in the direction of the error…)
Oh yes, here is how to reproduce it with set autochdir in ~/.vimrc (nerdtree version 6.10.10, fzf commit 7191ebb615f5d6ebbf51, fzf.vim commit e34f6c129d39b90db44d):
- open vim with a file
-
:NERDTreeToggleworks fine
-
- open another file via Ctrl-T in an fzf window (at least it happens with
:GFilesand:Buffers) Edit: the newly opened file must be in a different subdirectory to triggerautochdirbehaviour, e.g.vim ./INSTALLfor the first file and then open./config/Kconfigin a new tab. -
:NERDTreeTogglefails with "NERDTree: 57 file(s) could not be loaded into the NERD tree"
What's also interesting: :NERDTreeToggle works fine if I open a new file in the same window instead of a new tab, but shows the directory from the first loaded file.
When I don't set autochdir on vim startup, the above actions work as expected, no error in NERDTreeToggle.
As a workaround, I now leave the setting at noautochdir, and use the key bindings from these two articles instead.
So in short: this is not an fzf or vim-fzf issue.