nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit bccd73c8f5b19d479de9ff96f42722ae716db0b9
parent fd487dfa5ccf78134871c7363054dbc84f287c56
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Sun,  6 Jul 2008 16:25:59 +1200

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.

Diffstat:
Mdoc/NERD_tree.txt | 8++++++--
Mplugin/NERD_tree.vim | 3++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt
@@ -240,8 +240,8 @@ Default key: t
 Map option: NERDTreeMapOpenInTab
 Applies to: files and directories.
 
-Opens the selected file in a new tab. If a directory is selected, a netrw is
-opened in a new tab.
+Opens the selected file in a new tab. If a directory is selected, a fresh
+NERD Tree for that directory is opened in a new tab.
 
 If a bookmark which points to a directory is selected, open a NERD tree for
 that directory in a new tab. If the bookmark points to a file, open that file
@@ -874,6 +874,10 @@ fridge for later ;)
 ==============================================================================
 7. Changelog                                               *NERDTreeChangelog*
 
+2.x.x
+    - make the t/T on directory nodes open a fresh NERD tree for the selected
+      dir in a new tab, rather than a netrw.
+
 2.12.0
     - added a UI for bookmarks. See :help NERDTreeBookmarkTable for details.
       Thanks to Zhang Shuhan for testing and bug reports.
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -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