:set 选项的显示值

2024-05-14

如果你不给:colorscheme一个参数,然后它显示 vim 当前使用的颜色方案的名称。 vim 中是否有类似的方法来显示是否设置了选项或如果选项的值不是布尔值则设置为什么?例如,如果我想知道是否autoindent已设置或者我想知道的值textwidth,我怎样才能找到呢?


Use the :set命令。

  • :set autoindent?打印选项及其值(如果有)。维姆切换选项(布尔值,打开/关闭的选项),例如autoindent, 前缀为no表明它们已关闭,所以:set autoindent?将显示autoindent or noautoindent.
  • :set autoindent turns autoindent on.
    • 此表单将切换选项on
    • 对于数字或字符串选项,这显示选项的值,所以:set textwidth还将打印选项的值。对于数字或字符串选项,:set option相当于:set option?.
  • :set autoindent!反转选项。autoindent变成noautoindent.
  • :set autoindent&恢复autoindent为其默认值。
  • 设置数字或字符串选项:set option=value, e.g. set tabstop=3
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

:set 选项的显示值 的相关文章

随机推荐