简体   繁体   English

启动新选项卡时-如何给出某些命令-VIM

[英]When lauching a new tab - How to have certain commands given - VIM

I have nerdtree plugin installed with my vim. 我的vim上安装了nerdtree插件。 This nerdTree gets activated when I press Ctrl + n Now what i want is when i press t on a file in the nerd tree window it is launched in a new tab. 当我按Ctrl + n时,该nerdTree被激活。现在我想要的是,当我在书呆子树窗口中的文件上按t ,它将在新选项卡中启动。 Is there a way for me to set the t option so that when i press t and the file is opened in a new tab the command Ctrl + n is also passed and there is a new nerd tree window in that tab ? 有没有办法设置t选项,以便在按t并在新选项卡中打开文件时也传递Ctrl + n命令,并且该选项卡中有一个新的书呆子树窗口?

What you are looking for is the NERDTree-tabs plugin, which is designed for exactly this reason. 您正在寻找的是NERDTree-tabs插件,正是出于这个原因而设计的。 It's a small extension of NERDTree. 它是NERDTree的一个小扩展。

In short, it makes NERDTree tab-aware. 简而言之,它使NERDTree可识别选项卡。 If you have multiple tabs open, your NERDTree will either be open in all of them or closed in all of them. 如果打开了多个选项卡,则NERDTree将在所有选项卡中打开或关闭。

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

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