仅在启用+ python时加载插件

Rya*_*cox 2 vim

我有一个插件,只有在使用+ python pythonhelper编译vim时才会运行.我与许多机器共享我的.vim,有些机器没有打开python模式编译的vim.

所以,我想知道:是否有一个vim命令,我可以放入我的vimrc所以我可以有条件地包含插件?

就像是:

if PYTHON_FEATURE_ENABLED
    add the pythonhelper to the runtimepath...
end
Run Code Online (Sandbox Code Playgroud)

我知道我可以修改vim的runtimepath以包含插件,但在.vimrc中执行这种条件的vim语法是什么?

ros*_*dia 7

if has("python")
 " code here
endif
Run Code Online (Sandbox Code Playgroud)