nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 3796a8799a4805a296cb734bf4215ef06e27cf27
parent c726655d23af4b50a729eceae5e80a421316f1e4
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Fri,  6 Mar 2009 15:57:51 +1300

map '<CR>' to the same as 'o'

Diffstat:
Mdoc/NERD_tree.txt | 1+
Mplugin/NERD_tree.vim | 2++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt
@@ -211,6 +211,7 @@ x.......Close the current nodes parent...........................|NERDTree-x|
 X.......Recursively close all children of the current node.......|NERDTree-X|
 e.......Edit the current dif.....................................|NERDTree-e|
 
+<CR>...............same as |NERDTree-o|.
 double-click.......same as the |NERDTree-o| map.
 middle-click.......same as |NERDTree-i| for files, same as
                    |NERDTree-e| for dirs.
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2404,6 +2404,7 @@ function! s:dumpHelp()
         let @h=@h."\" ============================\n"
         let @h=@h."\" File node mappings~\n"
         let @h=@h."\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n"
+        let @h=@h."\" <CR>,\n"
         if b:NERDTreeType ==# "primary"
             let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in prev window\n"
         else
@@ -3059,6 +3060,7 @@ function! s:bindMappings()
 
     exec "nnoremap <silent> <buffer> ". g:NERDTreeMapActivateNode . " :call <SID>activateNode(0)<cr>"
     exec "nnoremap <silent> <buffer> ". g:NERDTreeMapOpenSplit ." :call <SID>openEntrySplit(0,0)<cr>"
+    exec "nnoremap <silent> <buffer> <cr> :call <SID>activateNode(0)<cr>"
 
     exec "nnoremap <silent> <buffer> ". g:NERDTreeMapPreview ." :call <SID>previewNode(0)<cr>"
     exec "nnoremap <silent> <buffer> ". g:NERDTreeMapPreviewSplit ." :call <SID>previewNode(1)<cr>"