vimrc setting to ignore file types in netrw
Asked Answered
I

1

20

What is the setting used in .vimrc to make the netrw directory listing ignore/hide certain file types?

set wildignore=*.obj,*.exe only seems to work for tab completion.
Within netrw, you can ctrl-g to edit the hiding list, but that only lasts for that session.

Ichor answered 13/11, 2010 at 3:59 Comment(0)
S
36

As per http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#g:netrw_list_hide, this should work:

let g:netrw_list_hide= '.*\.swp$'
Scirrhous answered 13/11, 2010 at 4:6 Comment(5)
You missed the closing quote, but after fixing that, it works. Thanks!Ichor
FYI adding more than one regex requires a comma inside the string. For example: g:netrw_list_hide= '.*\.swp$,.*\.pyc'Rooftree
Thanks for the addition @brycepg!Scirrhous
@BryceGuinta Saves my day....the help does not mention this, I don't know why!! (newcomer to lovely vim here)Loreleilorelie
If you use NERDTree let NERDTreeIgnore = ['\.swp$']Fredericfrederica

© 2022 - 2024 — McMap. All rights reserved.