diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 0dfc36f..874035a 100644 --- 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 \n" let @h=@h."\" :ClearBookmarks []\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()