开发者

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

开发者 https://www.devze.com 2022-12-18 09:35 出处:网络
I know there\'s NERDTree and NERDTreeToggle, however the function I want is: if there is not a NERDTre开发者_如何转开发e window, pop one up

I know there's NERDTree and NERDTreeToggle,

however the function I want is:

if there is not a NERDTre开发者_如何转开发e window, pop one up if there already is one, switch to the NERDTree window

Thanks!


Just use the NERDTree command. It seems to do this for you unless I'm missing something you want. You can use custom and inbuilt commands straight in vimscript. Eg.

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

:call NerdyFoo()
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号