From 33a64260cd5540dc55df32df87ca8fb1f4e1648d Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Wed, 4 Jan 2012 11:11:12 +0000 Subject: [PATCH] add NERDTreeCustomIgnoreFilter hook this gives users a chance to filter out nodes using whatever logic they please --- doc/NERD_tree.txt | 1 + plugin/NERD_tree.vim | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt index 395aafa..5598dae 100644 --- a/doc/NERD_tree.txt +++ b/doc/NERD_tree.txt @@ -1128,6 +1128,7 @@ The latest dev versions are on github Next - add 'scope' argument to the key map API + - add NERDTreeCustomIgnoreFilter hook - needs doc 4.2.0 - Add NERDTreeDirArrows option to make the UI use pretty arrow chars diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index c661f77..649632e 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2306,6 +2306,10 @@ function! s:Path.ignore() return 1 endif + if exists("*NERDTreeCustomIgnoreFilter") && NERDTreeCustomIgnoreFilter(self) + return 1 + endif + return 0 endfunction