My Netrw config here.

let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25

Just i want to hide "|" and "/". But how? I try :help netrw command but i can't found solution.

enter image description here

1 Answer 1


There's no documented way to hide the slashes that follow directory names. If you're willing to change a bit of code to remove them then find the following line in $VIMRUNTIME/autoload/netrw.vim

let pfile= filename."/"

You can just search for "getftype" to get you in the general area of the (large) file...the line above is within a few lines of the last occurrence of that string.

Now just remove the / (leave the surrounding quotes) and save the change. That should do it. The next time you launch an instance of vim no more slashes.

As for the vertical lines, they are integral to tree-style listings which is what you are using. The listings would be difficult to read without them so it's no surprise that there's no way to disable them. You could use a different list style...

Change g:netrw_liststyle to 0, 1 or 2.

From :h netrw-browser-settings:

  *g:netrw_liststyle*       Set the default listing style:
                                = 0: thin listing (one file per line)
                                = 1: long listing (one file per line with time
                                     stamp information and file size)
                                = 2: wide listing (multiple files in columns)
                                = 3: tree style listing
  • You could also change the highlighting group netrwClassify to make the slashes less visible.
    – Mass
    Jan 19, 2018 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.