1

When I try and open a file with a long name in netrw in a directory listing with file date showing it will open the file as testfile999 Sun 20 Feb..... including the date hence resulting in a new file buffer not the file.

To reproduce:

  1. open netrw
  2. press i to show directory listing with file dates.
  3. open a file with a long name so that the filename runs into the next column
  4. netrw doesn't open the file and instead opens a new file buffer with the wrong filename.

Is there a setting to fix that.

Stephen
  • 23
  • 3

1 Answers1

0

I added this to my .vimrc and it solved the issue:

let g:netrw_dynamic_maxfilenamelen = 32

Unfortunately, this also introduces a very specific issue when using liststyle=1 where some directories are shown as empty files. For now I can live with that.

jlnthws
  • 1
  • 1