fzf.vim icon indicating copy to clipboard operation
fzf.vim copied to clipboard

NERDTree: 5 file(s) could not be loaded into the NERD tree

Open Migacz85 opened this issue 6 years ago • 11 comments

  • 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?

Migacz85 avatar Aug 11 '19 22:08 Migacz85

+1

yang4515 avatar Sep 02 '19 15:09 yang4515

+1

leijie-ww avatar Nov 12 '19 13:11 leijie-ww

Have the same issue when trying to use fzf and nerdtree at the same time in neovim

epszaw avatar Nov 26 '19 11:11 epszaw

  • I experience this problem with after I search file using :GFiles and 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 vim on mac.

snawaz avatar May 28 '20 13:05 snawaz

Same with vim 8.2.

gsnitter avatar Jun 22 '20 14:06 gsnitter

I found workaround, may be it will help to other people. Right after intial project or file opening open and close nerdtree.

epszaw avatar Jun 22 '20 14:06 epszaw

NERDTree does not load file after FZF was used (vim 8.2 and Linux) Workaround: Use built-in vim explorer netrw.

stepan-ruzicka avatar Mar 12 '21 19:03 stepan-ruzicka

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…)

rohieb avatar Aug 09 '21 13:08 rohieb

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
    • :NERDTreeToggle works fine
  • open another file via Ctrl-T in an fzf window (at least it happens with :GFiles and :Buffers) Edit: the newly opened file must be in a different subdirectory to trigger autochdir behaviour, e.g. vim ./INSTALL for the first file and then open ./config/Kconfig in a new tab.
  • :NERDTreeToggle fails 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.

rohieb avatar Aug 09 '21 13:08 rohieb

As a workaround, I now leave the setting at noautochdir, and use the key bindings from these two articles instead.

rohieb avatar Aug 10 '21 13:08 rohieb

So in short: this is not an fzf or vim-fzf issue.

rohieb avatar Oct 25 '21 10:10 rohieb