Mac OS X上的Neovim显示问题

时间:2018-03-21 13:45:18

标签: macos vim vim-plugin neovim

我通常在我的Linux配置上使用Neovim,但今天我必须使用Mac,我将不得不暂时使用它...

所以我安装了包管理器Homebrew并安装了Neovim。我把我的配置(init.vim)和安装Vim-Plug插件管理器。我安装了我的插件,一切正常!

当我重新启动Neovim时出现显示问题...背景为蓝色。

有显示背景问题的链接:https://imgur.com/a/bLDsR

我有通常的配色方案:https://github.com/rakr/vim-one/blob/master/screenshots/new-logo.png

这是配色方案配置文件的一部分:

    Plug 'rakr/vim-one'
    autocmd ColorScheme one let g:airline_theme='one'

call plug#end()

if (empty($TMUX))
  if (has("nvim"))
  "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
  let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  endif
  "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
  "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
  " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
  if (has("termguicolors"))
    set termguicolors
  endif
endif

colorscheme one
set background=dark

我不是Mac上的专家我一定错过了什么,但我无法弄清楚是什么。

非常感谢一些帮助。如果您需要更多详细信息,我将随时为您服务。

谢谢:)

1 个答案:

答案 0 :(得分:1)

不幸的是,Mac中的默认terminal.app不支持真彩色。如果您的配置中有set termguicolors,则可能会错误显示您使用的颜色方案。您有两种选择:

  • 在terminal.app上粘贴,并在配置中使用set notermguicolors
  • 使用其他支持真彩色的终端应用程序,例如itermkittyalacritty。将nvim设置为使用真彩色:set termguicolors
相关问题