Using VIM NERDTree Plugin.
Is there any way to remap the Double Click on a File action to open the file silently in a new tab (T)?
Using VIM NERDTree Plugin.
Is there any way to remap the Double Click on a File action to open the file silently in a new tab (T)?
Although my NERDtree version is also reported as 4.2.0 (git cloned 2015-07-22), there seems to have been some major refactoring in the mean time, hence the solution by jens-na in section (3) did not transfer (but there still doesn't seem to be an out-of-the-box solution, either). I had to replace a line in autoload/nerdtree/ui_glue.vim, as per the diff below. (Note: tested on MacVim)
1 Introduction
This works for NERD tree version 4.2.0.
2 Open directories and files in a new tab
If you would like to open directories and files in a new tab you can simply add the following line to your
~/.vimrc
.3 Only open files in a new tab
If you only want to open files in a new tab you have to do something more sophisticated.
Add this function somewhere in
NERD_tree.vim
:and replace the line
with:
You can find this line in the function
s:bindMappings()
in the fileNERD_tree.vim
.