Created
January 5, 2012 20:23
-
-
Save scrooloose/1567086 to your computer and use it in GitHub Desktop.
NERDTree custom mappings to make i and s reuse existing 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
call NERDTreeAddKeyMap({ | |
\ 'key': 'i', | |
\ 'scope': 'FileNode', | |
\ 'callback': "NERDTreeCustomOpenSplit", | |
\ 'quickhelpText': 'open split reusing if able' }) | |
function! NERDTreeCustomOpenSplit(node) | |
call a:node.open({'split': 'h', 'reuse': 1}) | |
endfunction | |
call NERDTreeAddKeyMap({ | |
\ 'key': 's', | |
\ 'scope': 'FileNode', | |
\ 'callback': "NERDTreeCustomOpenVSplit", | |
\ 'quickhelpText': 'open vsplit reusing if able' }) | |
function! NERDTreeCustomOpenVSplit(node) | |
call a:node.open({'split': 'v', 'reuse': 1}) | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment