diff --git a/autoload/nerdtree.vim b/autoload/nerdtree.vim index fdc816d..f1d94a7 100644 --- a/autoload/nerdtree.vim +++ b/autoload/nerdtree.vim @@ -371,6 +371,13 @@ function! nerdtree#initNerdTreeMirror() endif endfunction +" FUNCTION: nerdtree#invokeKeyMap(key) {{{2 +"this is needed since I cant figure out how to invoke dict functions from a +"key map +function! nerdtree#invokeKeyMap(key) + call g:NERDTreeKeyMap.Invoke(a:key) +endfunction + " FUNCTION: nerdtree#nextBufferName() {{{2 " returns the buffer name for the next nerd tree function! nerdtree#nextBufferName() diff --git a/plugin/nerdtree/key_map.vim b/plugin/nerdtree/key_map.vim index d010c5a..deecea8 100644 --- a/plugin/nerdtree/key_map.vim +++ b/plugin/nerdtree/key_map.vim @@ -43,7 +43,7 @@ function! s:KeyMap.bind() let premap = self.key == "" ? " " : " " - exec 'nnoremap '. self.key . premap . ':call KeyMap_Invoke("'. keymapInvokeString .'")' + exec 'nnoremap '. self.key . premap . ':call nerdtree#invokeKeyMap("'. keymapInvokeString .'")' endfunction "FUNCTION: KeyMap.Remove(key, scope) {{{3 @@ -121,12 +121,6 @@ function! s:KeyMap.Invoke(key) endif endfunction -"this is needed since I cant figure out how to invoke dict functions from a -"key map -function! s:KeyMap_Invoke(key) - call s:KeyMap.Invoke(a:key) -endfunction - "FUNCTION: KeyMap.Create(options) {{{3 function! s:KeyMap.Create(options) let newKeyMap = copy(self) @@ -145,3 +139,4 @@ function! s:KeyMap.Add(keymap) call add(s:KeyMap.All(), a:keymap) endfunction +" vim: set sw=4 sts=4 et fdm=marker: