commit 5c2060149f52b31786e9003222d3dc54ba80fed9 parent 76dbc0c8eee86df041c6c97b2bd1ea4f266d0054 Author: Martin Grenfell <martin.grenfell@gmail.com> Date: Wed, 6 May 2015 21:19:06 +0100 doc NERDTreeAddPathFilter() Diffstat:
| M | doc/NERD_tree.txt | | | 20 | ++++++++++++++++++++ |
1 file changed, 20 insertions(+), 0 deletions(-) diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt @@ -34,6 +34,7 @@ CONTENTS *NERDTree-contents* 4.The NERD tree API.......................|NERDTreeAPI| 4.1.Key map API.......................|NERDTreeKeymapAPI| 4.2.Menu API..........................|NERDTreeMenuAPI| + 4.3.Menu API..........................|NERDTreeAddPathFilter()| 5.About...................................|NERDTreeAbout| 6.Changelog...............................|NERDTreeChangelog| 7.Credits.................................|NERDTreeCredits| @@ -1174,6 +1175,24 @@ When any of the 3 concrete menu items are selected the function "SomeFunction" will be called. ------------------------------------------------------------------------------ +4.3 NERDTreeAddPathFilter(callback) *NERDTreeAddPathFilter()* + +Path filters are essentially a more powerful version of |NERDTreeIgnore|. +If the simple regex matching in |NERDTreeIgnore| is not enough then use +|NERDTreeAddPathFilter()| to add a callback function that paths will be +checked against when the decision to ignore them is made. Example > + + call NERDTreeAddPathFilter('MyFilter') + + function! MyFilter(params) + "params is a dict containing keys: 'nerdtree' and 'path' which are + "g:NERDTree and g:NERDTreePath objects + + "return 1 to ignore params['path'] or 0 otherwise + endfunction +< + +------------------------------------------------------------------------------ NERDTreeRender() *NERDTreeRender()* Re-renders the NERD tree buffer. Useful if you change the state of the tree and you want to it to be reflected in the UI. @@ -1203,6 +1222,7 @@ Next - add 'scope' argument to the key map API - add NERDTreeCustomIgnoreFilter hook - needs doc - add magic [[dir]] and [[file]] flags to NERDTreeIgnore + - add support for custom path filters. See :help NERDTreeAddPathFilter() 4.2.0 - Add NERDTreeDirArrows option to make the UI use pretty arrow chars
