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?


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.

|improve this answer|||||

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

|improve this answer|||||
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.