How to open a file in new tab by default in NERDTree?

后端 未结 7 1947
说谎
说谎 2021-02-01 01:10

I want a file to be opened in a new tab when I enter or double click it. I know there is t shortcut but I always open a file in a new tab and enter is more confortabl

7条回答
  •  终归单人心
    2021-02-01 01:38

    As described in section NERDTreeCustomOpenArgs of the NerdTree help, you can use this option to control the opening behavior of files and directories. Add the following statement to your .vimrc:

    let NERDTreeCustomOpenArgs={'file':{'where': 't'}}
    

    This ensures in this case that only files in a new tab are opened. All other combinations can be found in the help.

提交回复
热议问题