vim 的 nord 配色方案与文档不匹配

时间:2021-04-29 07:27:39

标签: vim color-scheme

我按照说明安装了方案,但颜色仍然没有文档中的颜色。 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

enter image description here

3 个答案:

答案 0 :(得分:0)

从错误来看,您似乎没有在您的计算机上编译该功能 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”前面是否有“+”(您有)或 '-' 在它前面(你没有)。

答案 1 :(得分:0)

该错误是不言自明的:您正在设置 Vim 中不可用的选项。

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

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

  • 有条件地设置:

    if exists('+termguicolors')
        set termguicolors
    endif
    

    :help exists()

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

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

  • GUI Vim,
  • 在合适的终端模拟器中内置 termguicolors 功能和 termguicolors 选项集的 TUI Vim,
  • 在 TUI Vim 中,如果您change the colour palette 使用终端模拟器。

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

答案 2 :(得分:0)

已解决问题。

确实,问题在于缺乏 termguicolors。 Ubuntu 是运行 7.4 版的 vim。 从版本 8 开始,termguicolors 已添加到 vim 中。我不得不更新 vim。 谢谢大家。

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

enter image description here

enter image description here

enter image description here

相关问题