4

I have vim save my undo history in files named something like .filename.js.un~, but I don't want this cluttering up my list of file in vim (in Netrw).

Is there a way to exclude all files with a certain file extension in Netrw?

aharris88
  • 1,847
  • 2
  • 17
  • 22

2 Answers2

4

Use g:netrw_list_hide. e.g.

let g:netrw_list_hide= '.*\.swp$'
let g:netrw_hide = 1

For more information see :h g:netrw_list_hide and :h netrw-edithide

Peter Rincker
  • 15,854
  • 1
  • 36
  • 45
  • This looks good, but I can't seem to figure out a command that works for excluding the undo files. I tried let g:netrw_list_hide= '.*\.un~$' and it doesn't work. – aharris88 Apr 22 '15 at 19:51
4

For your case,

let g:netrw_list_hide='.*\.un\~$'

will do the trick. See

:help /~

for why the extra backslash preceding the tilde is needed.

user21497
  • 811
  • 5
  • 5