I want to use o to open a file that may already be open in some other tab within my VI session. It always jumps to the tab where the file is open. Is there some way to stop this and just duplicate the file in the current tab/split?
How do I convince nerdtree to open file in current window
Add this to your .vimrc
let g:NERDTreeMapActivateNode = ''
let g:NERDTreeMapOpenInTab = 'o'
Note that hitting Enter now calls the function that pressing o
originally called by default. Also, it will open the file in a new tab even when no file is being viewed.
I would recommend just using t
or s
.
Using
s
worked to me, I prefer to open files in the same view that NERDTree is opened. –
Antilepton Add this to your .vimrc
let g:NERDTreeMapActivateNode = 'go'
let g:NERDTreeMapPreview = 'o'
© 2022 - 2024 — McMap. All rights reserved.
o
? I believe usings
ort
instead might have the desired functionality. If you need to useo
you could remap it to the function called by pressings
ort
. Not sure how to do that quite yet, but will update with an answer when I do. – Logrolling