尝试过的解决方案:添加和添加export TERM=xterm-256color
到其他问题的解决方案中指出的。.bashrc
.zshrc
set t_Co=256
.vimrc
是的,我使用的配色方案同时支持 gui 和它所在的终端。
我主要使用macos,hyper.app
但类似的情况同时发生,Terminal.app
所以我想这不是模拟器的问题。
其他堆栈溢出问题中相当奇怪的事情:将此添加到我的.vimrc
:
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
将我的 vim 背景更改为深灰色(我不知道它来自哪里),但删除它会将其更改回我的终端背景颜色。
我会接受任何解决方案(因为我厌倦了这个,让它工作),这样我就可以从mac vim gui
using中获得十六进制颜色,Color Picker.app
并且每次我决定更改主题时都可以将其强制设置为 vim 背景。
我所有的配置文件:
我也用过tmux
,但有无颜色都一样tmux
。
编辑:
的输出:scriptnames
1: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/vimrc
2: ~/.vimrc
3: ~/.vim/autoload/plug.vim
4: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/filetype.vim
5: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/ftplugin.vim
6: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/indent.vim
7: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/syntax/syntax.vim
8: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/syntax/synload.vim
9: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/syntax/syncolor.vim
10: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/ftoff.vim
11: ~/.vim/bundle/Vundle.vim/autoload/vundle.vim
12: ~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim
13: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/syntax/nosyntax.vim
14: ~/.vim/plugged/nemo/colors/nemo-dark.vim
15: ~/.vim/bundle/vim-tmux-navigator/plugin/tmux_navigator.vim
16: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/getscriptPlugin.vim
17: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/gzip.vim
18: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/logiPat.vim
19: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/manpager.vim
20: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/matchparen.vim
21: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/netrwPlugin.vim
22: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/rrhelper.vim
23: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/spellfile.vim
24: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/tarPlugin.vim
25: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/tohtml.vim
26: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/vimballPlugin.vim
27: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/plugin/zipPlugin.vim
28: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/ftplugin/python.vim
29: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/indent/python.vim
30: /usr/local/Cellar/macvim/8.0-146_1/MacVim.app/Contents/Resources/vim/runtime/syntax/python.vim
还尝试将其添加到.vimrc
:
set background=dark
highlight Normal ctermbg=NONE
highlight nonText ctermbg=NONE
编辑(2):
这是相同主题的屏幕截图以及它是如何呈现的