add quickhelpText to s:KeyMap and display it in quickhelp
This commit is contained in:
parent
abc0cc4c40
commit
389f33ea81
@ -458,6 +458,7 @@ function! s:KeyMap.Create(options)
|
|||||||
let newKeyMap = {}
|
let newKeyMap = {}
|
||||||
let newKeyMap = copy(self)
|
let newKeyMap = copy(self)
|
||||||
let newKeyMap.key = a:options['key']
|
let newKeyMap.key = a:options['key']
|
||||||
|
let newKeyMap.quickhelpText = a:options['quickhelpText']
|
||||||
let newKeyMap.callback = a:options['callback']
|
let newKeyMap.callback = a:options['callback']
|
||||||
call add(s:KeyMap.All(), newKeyMap)
|
call add(s:KeyMap.All(), newKeyMap)
|
||||||
endfunction
|
endfunction
|
||||||
@ -2579,6 +2580,15 @@ function! s:dumpHelp()
|
|||||||
let @h=@h."\" ". g:NERDTreeMapToggleFiles .": files (" . (b:NERDTreeShowFiles ? "on" : "off") . ")\n"
|
let @h=@h."\" ". g:NERDTreeMapToggleFiles .": files (" . (b:NERDTreeShowFiles ? "on" : "off") . ")\n"
|
||||||
let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (b:NERDTreeShowBookmarks ? "on" : "off") . ")\n"
|
let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (b:NERDTreeShowBookmarks ? "on" : "off") . ")\n"
|
||||||
|
|
||||||
|
"add quickhelp entries for each custom key map
|
||||||
|
if len(s:KeyMap.All())
|
||||||
|
let @h=@h."\"\n\" ----------------------------\n"
|
||||||
|
let @h=@h."\" Custom mappings~\n"
|
||||||
|
for i in s:KeyMap.All()
|
||||||
|
let @h=@h."\" ". i.key .": ". i.quickhelpText ."\n"
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
|
|
||||||
let @h=@h."\"\n\" ----------------------------\n"
|
let @h=@h."\"\n\" ----------------------------\n"
|
||||||
let @h=@h."\" Other mappings~\n"
|
let @h=@h."\" Other mappings~\n"
|
||||||
let @h=@h."\" ". g:NERDTreeMapQuit .": Close the NERDTree window\n"
|
let @h=@h."\" ". g:NERDTreeMapQuit .": Close the NERDTree window\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user