Skip to content

Instantly share code, notes, and snippets.

@scrooloose
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scrooloose/17d35c3efd7941321f00 to your computer and use it in GitHub Desktop.
Save scrooloose/17d35c3efd7941321f00 to your computer and use it in GitHub Desktop.
nerdtree plugin to override 'o' and make it not reuse windows
"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