make t/T open a nerd tree rather than netrw

make the t/T on directory nodes open a fresh NERD tree for the selected
dir in a new tab, rather than a netrw.
This commit is contained in:
Martin Grenfell
2008-07-06 16:25:59 +12:00
parent fd487dfa5c
commit bccd73c8f5
2 changed files with 8 additions and 3 deletions

View File

@@ -3214,7 +3214,8 @@ function! s:OpenInNewTab(stayCurrentTab)
let treenode = s:GetSelectedNode()
if treenode != {}
if treenode.path.isDirectory
exec "tabnew +NERDTree\\ " . treenode.path.StrForNERDTreeCmd()
tabnew
call s:InitNerdTree(treenode.path.StrForOS(0))
else
exec "tabedit " . treenode.path.StrForEditCmd()
endif