nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit e4efdb3bd4fb9281720c459123ff4f7f3e7a434a
parent 721ad3ecc2ac2ad66a92bf3df9a25964b8f48d2e
Author: Cam Thompson <cam@camthompson.com>
Date:   Thu, 13 Jan 2011 17:13:29 -0500

add option to hide 'Press ? for help'

Diffstat:
Mplugin/NERD_tree.vim | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -51,6 +51,7 @@ call s:initVariable("g:NERDTreeAutoCenter", 1)
 call s:initVariable("g:NERDTreeAutoCenterThreshold", 3)
 call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
 call s:initVariable("g:NERDTreeChDirMode", 0)
+call s:initVariable("g:NERDTreeShowPressForHelp", 1)
 if !exists("g:NERDTreeIgnore")
     let g:NERDTreeIgnore = ['\~$']
 endif
@@ -2996,12 +2997,12 @@ function! s:dumpHelp()
         let @h=@h."\" :OpenBookmark <name>\n"
         let @h=@h."\" :ClearBookmarks [<names>]\n"
         let @h=@h."\" :ClearAllBookmarks\n"
-    else
+        silent! put h
+    elseif g:NERDTreeShowPressForHelp == 1
         let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
+        silent! put h
     endif
 
-    silent! put h
-
     let @h = old_h
 endfunction
 "FUNCTION: s:echo  {{{2
@@ -3268,8 +3269,10 @@ function! s:renderView()
     call s:dumpHelp()
 
     "delete the blank line before the help and add one after it
-    call setline(line(".")+1, "")
-    call cursor(line(".")+1, col("."))
+    if g:NERDTreeShowPressForHelp == 1
+        call setline(line(".")+1, "")
+        call cursor(line(".")+1, col("."))
+    endif
 
     if b:NERDTreeShowBookmarks
         call s:renderBookmarks()