如何检查 vim 编译时使用了哪些选项? [英] How can you check which options vim was compiled with?

查看:38
本文介绍了如何检查 vim 编译时使用了哪些选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我的 Vim 二进制文件使用了哪些编译选项.有没有办法查询这个?

I'd like to know which compilation options were used for my Vim binary. Is there any way to query this?

具体来说,我对它是否启用了 Python 支持感兴趣.

Specifically, I'm interested in if it has Python support enabled.

推荐答案

你可以通过执行看到 vim 编译的所有内容

You can see everything vim was compiled with by executing

:version

要查询像 python 这样的确切功能,您可以将 has() 函数与您要查找的功能一起使用.下面的代码将返回 1 如果它具有该特性或 0 如果它没有.

To query for an exact feature like python you can use the has() function with the feature you are looking for. The code below will return a 1 if it has the feature or 0 if it does not.

:echo has('python')

功能列表见:h +feature-list

有关更多信息,请参阅:

For more information see:

:h :version
:h has(
:h feature-list

这篇关于如何检查 vim 编译时使用了哪些选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆