简体   繁体   English

在新选项卡中打开文件时自动关闭NERDTree

[英]Auto-close NERDTree when opening file in new tab

When opening a file in a new tab in vim through NERDTree, I want the NERDTree window to be closed on the previous tab. 当通过NERDTree在vim的新选项卡中打开文件时,我希望在上一个选项卡上关闭NERDTree窗口。 The reason being, the tab title displays NERDTree in the previous tab. 原因是,标签标题在上一个标签中显示NERDTree I want the default behavior, ie, the name of the file to be displayed rather than the word NERDTree . 我想要默认行为,即要显示的文件的名称而不是单词NERDTree If I switch back to the previous tab and close the NERDTree window, the default behavior is noticed. 如果我切换回上一个选项卡并关闭NERDTree窗口,则会注意到默认行为。 What configuration settings do I need to add to auto-close NERDTree in my previous tab? 在上一个标签中,我需要添加哪些配置设置才能自动关闭NERDTree

Have you tried setting: 你试过设置:

let NERDTreeQuitOnOpen=1

This worked for me. 这对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM