nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 8a984260e75f85869fcf897575f3950380410f92
parent 370f180ca0d24da5861b4b5c017567a9914ef8df
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date:   Sat,  5 Jan 2013 01:48:13 +0000

manually apply #220 to fix NERDTreeFind for hidden dirs

Diffstat:
Mautoload/nerdtree.vim | 2+-
Mplugin/nerdtree/path.vim | 16++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/autoload/nerdtree.vim b/autoload/nerdtree.vim
@@ -179,7 +179,7 @@ function! nerdtree#findAndRevealPath()
         return
     endtry
 
-    if p.isUnixHiddenFile()
+    if p.isUnixHiddenPath()
         let showhidden=g:NERDTreeShowHidden
         let g:NERDTreeShowHidden = 1
     endif
diff --git a/plugin/nerdtree/path.vim b/plugin/nerdtree/path.vim
@@ -327,6 +327,21 @@ function! s:Path.isUnixHiddenFile()
     return self.getLastPathComponent(0) =~# '^\.'
 endfunction
 
+"FUNCTION: Path.isUnixHiddenPath() {{{3
+"check for unix path with hidden components
+function! s:Path.isUnixHiddenPath()
+    if self.getLastPathComponent(0) =~# '^\.'
+        return 1
+    else
+        for segment in self.pathSegments
+            if segment =~# '^\.'
+                return 1
+            endif
+        endfor
+        return 0
+    endif
+endfunction
+
 "FUNCTION: Path.ignore() {{{3
 "returns true if this path should be ignored
 function! s:Path.ignore()
@@ -693,3 +708,4 @@ function! s:Path.WinToUnixPath(pathstr)
     return toReturn
 endfunction
 
+" vim: set sw=4 sts=4 et fdm=marker: