How to filter out files by extension in NERDTree?

Arnis Lapsa picture Arnis Lapsa · Apr 9, 2011 · Viewed 22.9k times · Source

I would like to *.pyc files not to be shown in NERDTree vim plugin.

How to achieve that?

Answer

Alex picture Alex · Apr 9, 2011

You want the NERDTreeIgnore option. For example, in your .vimrc:

let NERDTreeIgnore = ['\.pyc$']

Where NERDTreeIgnore is an array of regular expressions that match the files you want to exclude.