nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit a50c571929a085c3a91dd2e2d1972c3d6d2b843e
parent b0bb781fc73ef40365e4c996a16f04368d64fc9d
Author: Andrew Marshall <andrew@johnandrewmarshall.com>
Date:   Sat,  7 Dec 2013 00:10:46 -0500

Add option to respect wildignore

Diffstat:
Mdoc/NERD_tree.txt | 9+++++++++
Mlib/nerdtree/tree_dir_node.vim | 2+-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt
@@ -631,6 +631,8 @@ NERD tree. These options should be set in your vimrc.
 
 |'NERDTreeIgnore'|              Tells the NERD tree which files to ignore.
 
+|'NERDTreeWildIgnore'|          Tells the NERD tree to respect |'wildignore'|.
+
 |'NERDTreeBookmarksFile'|       Where the bookmarks are stored.
 
 |'NERDTreeMouseMode'|           Tells the NERD tree how to handle mouse
@@ -818,6 +820,13 @@ The file filters can be turned on and off dynamically with the |NERDTree-f|
 mapping.
 
 ------------------------------------------------------------------------------
+                                                        *'NERDTreeWildIgnore'*
+Values: 0 or 1.
+Default: 0.
+
+If set to 1, the |'wildignore'| setting is respected.
+
+------------------------------------------------------------------------------
                                                      *'NERDTreeBookmarksFile'*
 Values: a path
 Default: $HOME/.NERDTreeBookmarks
diff --git a/lib/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim
@@ -228,7 +228,7 @@ function! s:TreeDirNode._initChildren(silent)
     let dir = self.path
     let globDir = dir.str({'format': 'Glob'})
 
-    if version >= 703
+    if version >= 703 && g:NERDTreeWildIgnore
         let filesStr = globpath(globDir, '*', 1) . "\n" . globpath(globDir, '.*', 1)
     else
         let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')