mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 03:43:50 -05:00
doc NERDTreeAddPathFilter()
This commit is contained in:
@@ -34,6 +34,7 @@ CONTENTS *NERDTree-contents*
|
|||||||
4.The NERD tree API.......................|NERDTreeAPI|
|
4.The NERD tree API.......................|NERDTreeAPI|
|
||||||
4.1.Key map API.......................|NERDTreeKeymapAPI|
|
4.1.Key map API.......................|NERDTreeKeymapAPI|
|
||||||
4.2.Menu API..........................|NERDTreeMenuAPI|
|
4.2.Menu API..........................|NERDTreeMenuAPI|
|
||||||
|
4.3.Menu API..........................|NERDTreeAddPathFilter()|
|
||||||
5.About...................................|NERDTreeAbout|
|
5.About...................................|NERDTreeAbout|
|
||||||
6.Changelog...............................|NERDTreeChangelog|
|
6.Changelog...............................|NERDTreeChangelog|
|
||||||
7.Credits.................................|NERDTreeCredits|
|
7.Credits.................................|NERDTreeCredits|
|
||||||
@@ -1173,6 +1174,24 @@ Where selecting "a (s)ub menu" will lead to a second menu: >
|
|||||||
When any of the 3 concrete menu items are selected the function "SomeFunction"
|
When any of the 3 concrete menu items are selected the function "SomeFunction"
|
||||||
will be called.
|
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()*
|
NERDTreeRender() *NERDTreeRender()*
|
||||||
Re-renders the NERD tree buffer. Useful if you change the state of the
|
Re-renders the NERD tree buffer. Useful if you change the state of the
|
||||||
@@ -1203,6 +1222,7 @@ Next
|
|||||||
- add 'scope' argument to the key map API
|
- add 'scope' argument to the key map API
|
||||||
- add NERDTreeCustomIgnoreFilter hook - needs doc
|
- add NERDTreeCustomIgnoreFilter hook - needs doc
|
||||||
- add magic [[dir]] and [[file]] flags to NERDTreeIgnore
|
- add magic [[dir]] and [[file]] flags to NERDTreeIgnore
|
||||||
|
- add support for custom path filters. See :help NERDTreeAddPathFilter()
|
||||||
|
|
||||||
4.2.0
|
4.2.0
|
||||||
- Add NERDTreeDirArrows option to make the UI use pretty arrow chars
|
- Add NERDTreeDirArrows option to make the UI use pretty arrow chars
|
||||||
|
|||||||
Reference in New Issue
Block a user