mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53: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:NERDTreeAutoCenterThreshold", 3)
|
||||||
call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
|
call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
|
||||||
call s:initVariable("g:NERDTreeChDirMode", 0)
|
call s:initVariable("g:NERDTreeChDirMode", 0)
|
||||||
|
call s:initVariable("g:NERDTreeShowPressForHelp", 1)
|
||||||
if !exists("g:NERDTreeIgnore")
|
if !exists("g:NERDTreeIgnore")
|
||||||
let g:NERDTreeIgnore = ['\~$']
|
let g:NERDTreeIgnore = ['\~$']
|
||||||
endif
|
endif
|
||||||
@@ -2996,12 +2997,12 @@ function! s:dumpHelp()
|
|||||||
let @h=@h."\" :OpenBookmark <name>\n"
|
let @h=@h."\" :OpenBookmark <name>\n"
|
||||||
let @h=@h."\" :ClearBookmarks [<names>]\n"
|
let @h=@h."\" :ClearBookmarks [<names>]\n"
|
||||||
let @h=@h."\" :ClearAllBookmarks\n"
|
let @h=@h."\" :ClearAllBookmarks\n"
|
||||||
else
|
silent! put h
|
||||||
|
elseif g:NERDTreeShowPressForHelp == 1
|
||||||
let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
|
let @h="\" Press ". g:NERDTreeMapHelp ." for help\n"
|
||||||
|
silent! put h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
silent! put h
|
|
||||||
|
|
||||||
let @h = old_h
|
let @h = old_h
|
||||||
endfunction
|
endfunction
|
||||||
"FUNCTION: s:echo {{{2
|
"FUNCTION: s:echo {{{2
|
||||||
@@ -3268,8 +3269,10 @@ function! s:renderView()
|
|||||||
call s:dumpHelp()
|
call s:dumpHelp()
|
||||||
|
|
||||||
"delete the blank line before the help and add one after it
|
"delete the blank line before the help and add one after it
|
||||||
call setline(line(".")+1, "")
|
if g:NERDTreeShowPressForHelp == 1
|
||||||
call cursor(line(".")+1, col("."))
|
call setline(line(".")+1, "")
|
||||||
|
call cursor(line(".")+1, col("."))
|
||||||
|
endif
|
||||||
|
|
||||||
if b:NERDTreeShowBookmarks
|
if b:NERDTreeShowBookmarks
|
||||||
call s:renderBookmarks()
|
call s:renderBookmarks()
|
||||||
|
|||||||
Reference in New Issue
Block a user