【问题标题】:The nord color scheme for vim does not match the documentationvim 的 nord 配色方案与文档不匹配
【发布时间】:2021-04-29 07:27:39
【问题描述】:

我按照说明安装了方案,但颜色仍然不像文档中的那样。 https://github.com/arcticicestudio/nord-vim 操作系统 - ubuntu 14,通过 ssh 连接。 应用,重启 vim。

:PlugInstall
~$ vim ~/.vimrc
Error detected while processing /home/test/.vimrc:
line   17:
E518: Unknown option: termguicolors
Press ENTER or type command to continue

【问题讨论】:

  • 一般来说,插件的问题应该在其问题跟踪器中讨论。在这种情况下,您的 Vim 没有所需的选项。

标签: vim color-scheme


【解决方案1】:

从错误来看,您似乎没有在您的系统上编译该功能 vim 的版本。虽然我不清楚你是否有set termguicolors 在您的 .vimrc 中,因为它是否是安装说明的一部分。 不管怎样,来自:help: termguicolors

                    'termguicolors' 'tgc' E954
'termguicolors' 'tgc'   boolean (default off)
            global
            {not available when compiled without the
            +termguicolors feature}

您可以通过以下方式检查您是否具有“termguicolors”功能:

:version

并查看“termguicolors”前面是否有一个“+”(你有它)或 '-' 在它前面(你没有)。

【讨论】:

  • 感谢 - 'vim --version'。
【解决方案2】:

问题已解决。

确实,问题在于缺少 termguicolors。 Ubuntu 是 vim 运行版本 7.4.. termguicolors 自版本 8 以来已添加到 vim。我不得不更新 vim。 谢谢大家。

vim --version
sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim
vim --version

【讨论】:

  • 很高兴它成功了 - 也许你可以接受/赞成我的回答。干杯
【解决方案3】:

这个错误是不言自明的:你设置的选项在你的 Vim 中不可用。

你有几种方法可以摆脱这种情况……

  • 根本没有设置:help 'termguicolors' 选项。

  • 有条件地设置它:

    if exists('+termguicolors')
        set termguicolors
    endif
    

    :help exists()

  • 安装包含termguicolors 功能的 Vim 版本(并确保您的终端模拟器支持它)。

请注意,此配色方案所承诺的外观只能在以下情况下实现:

  • GUI Vim,
  • TUI Vim 具有内置的termguicolors 功能和termguicolors 选项集,在合适的终端仿真器中,
  • 在 TUI Vim 中,如果您是终端模拟器的 change the colour palette

您应该在安装该插件之前阅读the instructions

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-07
    • 2013-11-21
    • 1970-01-01
    相关资源
    最近更新 更多