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

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

" Note: Only GUI colors differ from default, on terminal it's just `light'.
| improve this answer | |
2

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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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