简体   繁体   English

在VIM脚本语言中,是否有内置的跳转到NERDTree窗口的功能?

[英]In the VIM scripting language, is there a builtin for jump to NERDTree window?

I know there's NERDTree and NERDTreeToggle, 我知道有NERDTree和NERDTreeToggle,

however the function I want is: 但是我想要的功能是:

if there is not a NERDTree window, pop one up if there already is one, switch to the NERDTree window 如果没有NERDTree窗口,则弹出一个窗口(如果已经存在),切换到NERDTree窗口

Thanks! 谢谢!

Just use the NERDTree command. 只需使用NERDTree命令。 It seems to do this for you unless I'm missing something you want. 除非我想念您想要的东西,否则它似乎为您做到了。 You can use custom and inbuilt commands straight in vimscript. 您可以直接在vimscript中使用自定义和内置命令。 Eg. 例如。

function NerdyFoo()
    echo "FooBar"
    NERDTree
    echo "Wibblybits"
endfun

:call NerdyFoo()

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

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