Last active
August 29, 2015 14:04
-
-
Save scrooloose/17d35c3efd7941321f00 to your computer and use it in GitHub Desktop.
nerdtree plugin to override 'o' and make it not reuse windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Demo nerdtree plugin to override the default 'o' mapping and make it not | |
"reuse windows. | |
" | |
"Chuck this in | |
" ~/.vim/nerdtree_plugin/nerdtree_custom_open.vim | |
" | |
"or somewhere like | |
" ~/.vim/bundle/nerdtree_plugin/nerdtree_custom_open.vim | |
" | |
"if using pathogen or similar. | |
if exists("g:loaded_nerdtree_custom_open") | |
finish | |
endif | |
let g:loaded_nerdtree_custom_open = 1 | |
function! NERDTreeCustomOpen(node) | |
call a:node.activate({'reuse': 0, 'where': 'p'}) | |
endfunction | |
call NERDTreeAddKeyMap({ | |
\ 'key': 'o', | |
\ 'scope': "FileNode", | |
\ 'callback': "NERDTreeCustomOpen", | |
\ 'override': 1 }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment