2

I've installed MacVim using Brew: brew cask install neovim

I'm using the macOS's Terminal.app to run MacVim in Terminal mode.

I've experimented with :colorscheme peachpuff, since many recommends that color scheme, which comes with MacVim by default.

In the picture below shows how peachbuff looks, when running using mvim in Terminal mode (left) and GUI mode (right).

Why does the peachbuff color scheme looks so different in the two modes? Not even the background colors are identical.

I'm aware that GUI mode probably has full "truecolor" support, while the Terminal mode uses 256-colors. Is that the reason?

if has('gui_running')
   set background=light
   colorscheme macvim
else
"   set termguicolors
   set t_Co=256
   set background=light
   colorscheme peachpuff
endif

enter image description here

2
  • 1
    The included colorschemes are known to be a bit flaky. There is github.com/vim/colorschemes to make better default ones. I am sure help is appreciated there. Commented Jul 14, 2020 at 14:50
  • For me removing set termguicolors fixed the issue Commented May 27, 2021 at 22:30

2 Answers 2

3

So "peachpuff" has just the white background in console. You can patch the source directly, or add this to your vimrc:

augroup peachpuff | au!
    autocmd colorscheme peachpuff hi Normal ctermfg=0 ctermbg=223
augroup end

Still not exactly the same as in GUI, but it's much closer now.

P.S. Or you can "extend" an existing color scheme using the following template:

~/.vim/colors/peachpuff.vim

" read in the standard colorscheme
source $VIMRUNTIME/colors/<sfile>:t

" apply our fix
hi Normal ctermfg=0 ctermbg=223
2

In the code of peachpuff colorscheme we can find such note:

" Note: Only GUI colors differ from default, on terminal it's just `light'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.