mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
add option to hide 'Press ? for help'
This commit is contained in:
@@ -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,11 +2997,11 @@ function! s:dumpHelp()
|
||||
let @h=@h."\" :OpenBookmark <name>\n"
|
||||
let @h=@h."\" :ClearBookmarks [<names>]\n"
|
||||
let @h=@h."\" :ClearAllBookmarks\n"
|
||||
else
|
||||
let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
|
||||
endif
|
||||
|
||||
silent! put h
|
||||
elseif g:NERDTreeShowPressForHelp == 1
|
||||
let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
|
||||
silent! put h
|
||||
endif
|
||||
|
||||
let @h = old_h
|
||||
endfunction
|
||||
@@ -3268,8 +3269,10 @@ function! s:renderView()
|
||||
call s:dumpHelp()
|
||||
|
||||
"delete the blank line before the help and add one after it
|
||||
if g:NERDTreeShowPressForHelp == 1
|
||||
call setline(line(".")+1, "")
|
||||
call cursor(line(".")+1, col("."))
|
||||
endif
|
||||
|
||||
if b:NERDTreeShowBookmarks
|
||||
call s:renderBookmarks()
|
||||
|
||||
Reference in New Issue
Block a user