first attempt at customized the quit menu key binding

This commit is contained in:
Gustavo Homem 2024-10-10 10:32:16 +02:00
parent 9b465acb27
commit 720feff0c0
2 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,7 @@ function! s:MenuController._handleKeypress(key)
call self._cursorDown()
elseif a:key ==# g:NERDTreeMenuUp
call self._cursorUp()
elseif a:key ==# nr2char(27) "escape
elseif a:key ==# g:NERDTreeMenuQuit
let self.selection = -1
return 1
elseif a:key ==# "\r" || a:key ==# "\n" "enter and ctrl-j

View File

@ -139,6 +139,7 @@ let g:NERDTreeMapUpdirKeepOpen = get(g:, 'NERDTreeMapUpdirKeepOpen', 'U')
let g:NERDTreeMapCWD = get(g:, 'NERDTreeMapCWD', 'CD')
let g:NERDTreeMenuDown = get(g:, 'NERDTreeMenuDown', 'j')
let g:NERDTreeMenuUp = get(g:, 'NERDTreeMenuUp', 'k')
let g:NERDTreeMenuQuit = get(g:, 'NERDTreeMenuQuit', nr2char(27))
"SECTION: Load class files{{{2
call nerdtree#loadClassFiles()