我的配置
iTerm2 -使用xterm-256颜色作为Report terminal type的日光主题。
zsh -主题设置为agnoster
solarized vim -我的vim主题是Solarized的,下面是设置:
set background=dark
let g:solarized_termcolors=16 "This fixed some issues i had of bg colors that was coming brown before
colorscheme solarized现在所有的颜色都像预期的那样出现了,除了丑陋的评论,它的背景颜色是深灰色(我不认为这是这个主题的默认颜色)。

注意:我之前有海洋主题&评论颜色问题实际上发生在更新我的vundle包之后。
以下是我的.vimrc文件:
set nobackup " get rid of anoying ~file
set encoding=utf-8
"Load up vundle
set nocompatible " don't need to be compatible with old vim
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'mattn/emmet-vim' " Emmet for html
Plugin 'evidens/vim-twig' " Twig Syntax highlighting
Plugin 'hail2u/vim-css3-syntax' " CSS3 Syntax
Plugin 'Solarized'
" Plugin 'mhartington/oceanic-next' " Color Scheme
call vundle#end()
filetype plugin indent on
" load up pathogen and all bundles
" call pathogen#infect()
" call pathogen#helptags()
runtime macros/matchit.vim " autoload that extends % functionality
syntax on " show syntax highlighting
set autoindent " set auto indent
set ts=2 " set indent to 2 spaces
set shiftwidth=2
set softtabstop=2
set expandtab " use spaces, not tab characters
set relativenumber " show relative line numbers
set showmatch " show bracket matches
set ignorecase " ignore case in search
set hlsearch " highlight all search matches
" set cursorline " highlight current line
set smartcase " pay attention to case when caps are used
set incsearch " show search results as I type
set ttimeoutlen=100 " decrease timeout for faster insert with 'O'
set vb " enable visual bell (disable audio bell)
set ruler " show row and column in footer
set scrolloff=2 " minimum lines above/below cursor
set laststatus=2 " always show status bar
set list listchars=tab:»·,trail:· " show extra space characters
set nofoldenable " disable code folding
set clipboard=unnamed " use the system clipboard
set wildmenu " enable bash style tab completion
set wildmode=list:longest,full
" Color Scheme Settings
" set t_Co=256
set background=dark
let g:solarized_termcolors=16
colorscheme solarized
" set t_Co=256
" colorscheme OceanicNext
" set background=dark
" emmet key remap
imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
let g:cssColorVimDoNotMessMyUpdatetime = 1
" Current Directory remap
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' :'%%'
" Set tabstop, softtabstop and shiftwidth to the same value
command! -nargs=* Stab call Stab()
function! Stab()
let l:tabstop = 1 * input('set tabstop = softtabstop = shiftwidth = ')
if l:tabstop > 0
let &l:sts = l:tabstop
let &l:ts = l:tabstop
let &l:sw = l:tabstop
endif
call SummarizeTabs()
endfunction
function! SummarizeTabs()
try
echohl ModeMsg
echon 'tabstop='.&l:ts
echon ' shiftwidth='.&l:sw
echon ' softtabstop='.&l:sts
if &l:et
echon ' expandtab'
else
echon ' noexpandtab'
endif
finally
echohl None
endtry
endfunction
if &term =~ '256color'
" disable Background Color Erase (BCE) so that color schemes
" render properly when inside 256-color tmux and GNU screen.
set t_ut=
endif问题
我怎样才能让评论的颜色和这个主题的颜色一样呢?如下所示:

是不是我的.vimrc中有什么东西把它搞乱了?
发布于 2016-09-10 02:41:30
运行:
:hi Comment它应该返回应用于注释的颜色,例如:
:hi Comment
Comment xxx term=bold ctermfg=242在您的情况下,还应具备:
ctermbg=value "where value != 0所以运行:
:hi Comment ctermbg=0这应该会关闭注释的背景色。
要将其添加到.vimrc,请执行以下操作:
hi Comment ctermbg=0发布于 2020-06-09 12:16:28
当我在应用色彩方案后打开我的js文件时,发生了这个问题。有丑陋的背景颜色的评论和一些关键字如import,所以我不喜欢它。
我所做的是:hi,然后按回车,它将显示所有列表的突出显示名称和它的颜色。选择要更改的名称。下面是我的一个例子。
:hi jsComment cterm=NONE
:hi jsImport cterm=NONE
:hi jsFrom cterm=NONE希望这能有所帮助。
https://stackoverflow.com/questions/39417413
复制相似问题