VIM netrw shows directories as files (tree view)

2.4k Views Asked by At

I am running VIM version 8.2.501 with netrw v168 and I have spotted the following issue. In some cases nested directories appear as files and not as directories. This happens in a few use cases but the following one is a way to reproduce it.

  • Set netrw to use tree style i.e. set let g:netrw_liststyle = 3 in your .vimrc
  • Open netrw :e.
  • Open a nested directory

enter image description here

  • Press i to toggle modes until you return to tree view
  • You can't see all directories and directories appear as files (you can't expand them anymore)

enter image description here

After that, I can't close the netrw buffer with <c-6>. Refreshing the buffer <c-l> or toggling modes again does not fix the issue either. The only way to have your directories again is to close and open the directories above e.g. close/open foo will make foo1 appear again then close/open foo1 will make foo2 appear again etc.

Anyone else with this problem? Any fixes?

P.S. I observed that this can also happen when you create a new directory. The buffer refreshes and other directories appear as files. Looks like this view has a lot of bugs

0

There are 0 best solutions below