nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 71ee64fed77cb709e481b7145d88377cea185a04
parent bf217c75f9cd2207fb42b1f397cf4b98a6c9b616
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date:   Mon, 16 Nov 2015 11:30:16 +0000

add TreeDirNode.getDirChildren() - using this in a plugin

Diffstat:
Mlib/nerdtree/tree_dir_node.vim | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim
@@ -171,6 +171,12 @@ function! s:TreeDirNode.getChildIndex(path)
     return -1
 endfunction
 
+"FUNCTION: TreeDirNode.getDirChildren() {{{1
+"Get all children that are directories
+function! s:TreeDirNode.getDirChildren()
+    return filter(self.children, 'v:val.path.isDirectory == 1')
+endfunction
+
 "FUNCTION: TreeDirNode.GetSelected() {{{1
 "Returns the current node if it is a dir node, or else returns the current
 "nodes parent