How to convince nerdtree to open a file in the current window

I want to use oto open a file that can already be opened on some other tab of my VI session. It always jumps to the tab where the file is open. Is there a way to stop this and just duplicate the file in the current tab / split?

+6
source share
2 answers

Add this to your .vimrc

let g:NERDTreeMapActivateNode = ''
let g:NERDTreeMapOpenInTab = 'o'

Note that pressing Enter now calls a function that, when pressed, is oinitially called by default. In addition, it will open the file in a new tab, even if the file cannot be viewed.

I would recommend using only tor s.

+2

.vimrc

let g:NERDTreeMapActivateNode = 'go'
let g:NERDTreeMapPreview = 'o'
0

All Articles