首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >vim - colorscheme未正确设置背景颜色

vim - colorscheme未正确设置背景颜色
EN

Stack Overflow用户
提问于 2019-02-10 07:59:11
回答 1查看 328关注 0票数 0

我正在尝试设置vim的nightowl主题,但它似乎部分呈现。语法颜色正确,但背景显示为黑色。

我的vimrc看起来像这样:

代码语言:javascript
复制
" automatic installation of vim-plug, if it's not available
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
        \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

" plugins
call plug#begin('~/.vim/plugged')
Plug 'haishanh/night-owl.vim'
call plug#end()

if (has("termguicolors"))
  set termguicolors
endif

syntax enable
colorscheme night-owl

和:脚本名称

代码语言:javascript
复制
  1: /usr/share/vim/vimrc
  2: ~/.vimrc
  3: ~/dotfiles/vim/plugins.vim
  4: ~/.vim/autoload/plug.vim
  5: /usr/share/vim/vim80/filetype.vim
  6: /usr/share/vim/vim80/ftplugin.vim
  7: /usr/share/vim/vim80/indent.vim
  8: /usr/share/vim/vim80/syntax/syntax.vim
  9: /usr/share/vim/vim80/syntax/synload.vim
 10: /usr/share/vim/vim80/syntax/syncolor.vim
 11: ~/dotfiles/vim/colors.vim
 12: /usr/share/vim/vim80/syntax/nosyntax.vim
 13: ~/.vim/plugged/night-owl.vim/colors/night-owl.vim
 14: /usr/share/vim/vim80/plugin/getscriptPlugin.vim
 15: /usr/share/vim/vim80/plugin/gzip.vim
 16: /usr/share/vim/vim80/plugin/logiPat.vim
 17: /usr/share/vim/vim80/plugin/manpager.vim
 18: /usr/share/vim/vim80/plugin/matchparen.vim
 19: /usr/share/vim/vim80/plugin/netrwPlugin.vim
 20: /usr/share/vim/vim80/plugin/rrhelper.vim
 21: /usr/share/vim/vim80/plugin/spellfile.vim
 22: /usr/share/vim/vim80/plugin/tarPlugin.vim
 23: /usr/share/vim/vim80/plugin/tohtml.vim
 24: /usr/share/vim/vim80/plugin/vimballPlugin.vim
 25: /usr/share/vim/vim80/plugin/zipPlugin.vim
 26: /usr/share/vim/vim80/ftplugin/vim.vim
 27: /usr/share/vim/vim80/indent/vim.vim
 28: /usr/share/vim/vim80/syntax/vim.vim
 29: /usr/share/vim/vim80/syntax/ruby.vim
 30: /usr/share/vim/vim80/syntax/python.vim

应该是什么样子:night-owl-theme-vim

现在的样子:my-messed-up-night-owl-them

EN

回答 1

Stack Overflow用户

发布于 2019-02-13 18:26:41

Nightowl使用以下定义作为背景:

代码语言:javascript
复制
hi Normal guifg=#d6deeb ctermfg=253 guibg=#011627 ctermbg=233 gui=NONE cterm=NONE

对我来说(在gnome- terminal中),终端背景值(233)也呈现为几乎一片漆黑。您可能希望将该值调整为较浅的阴影(例如235),方法是复制:normal命令并将其放在:colorscheme之后。

由于这仍然是带索引的256色调色板,因此一些终端可能还允许将映射更改为实际的RGB颜色。我想这也解释了你在截图中看到的差异。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54612060

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档