Skip to content

Instantly share code, notes, and snippets.

@scrooloose
Created May 6, 2015 20:44
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save scrooloose/0495cade24f1f2ebb602 to your computer and use it in GitHub Desktop.
Save scrooloose/0495cade24f1f2ebb602 to your computer and use it in GitHub Desktop.
call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 })
function NERDTreeMyOpenInTab(node)
call a:node.open({'reuse': "all", 'where': 't'})
endfunction
@vrkansagara
Copy link

vrkansagara commented Apr 27, 2021

The above given solution is working just need to change the order of line.

function NERDTreeMyOpenInTab(node)
    call a:node.open({'reuse': "all", 'where': 't'})
endfunction
autocmd VimEnter * :call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 })

hope this peace of code also work with enter to open same file. is this possible ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment