diff --git a/lib/nerdtree/menu_controller.vim b/lib/nerdtree/menu_controller.vim index 952c67bd..81da0caa 100644 --- a/lib/nerdtree/menu_controller.vim +++ b/lib/nerdtree/menu_controller.vim @@ -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 diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 84c04fda..36b2afe2 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -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()