From ce6c347f858fe013a4551b50b5722694caf7dd82 Mon Sep 17 00:00:00 2001 From: Techlive Zheng Date: Mon, 5 Nov 2012 01:19:44 +0800 Subject: [PATCH] Make NERDTreeFind work on hidden files --- plugin/NERD_tree.vim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index ad1669f7..3e7c1bbc 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2999,6 +2999,11 @@ function! s:findAndRevealPath() return endtry + if p.getLastPathComponent(0) =~# '^\.' + let showhidden=g:NERDTreeShowHidden + let g:NERDTreeShowHidden = 1 + endif + if !s:treeExistsForTab() try let cwd = s:Path.New(getcwd()) @@ -3023,6 +3028,10 @@ function! s:findAndRevealPath() endif call s:putCursorInTreeWin() call b:NERDTreeRoot.reveal(p) + + if p.getLastPathComponent(0) =~# '^\.' + let g:NERDTreeShowHidden = showhidden + endif endfunction " FUNCTION: s:has_opt(options, name) {{{2