Upgraded my macOS to Monterrey 12.5.1 and now the vim colors are different. How to get them back to the way they were before?

Viewed 38

Upgraded my macOS to Monterrey 12.5.1 and now the vim colors are different:

different

For reference, these are the default colors of my terminal:

these are the default colors of my terminal

The default font color is gray, and this was the case before for vim as well, before the update.

Is there an easy way for me to come back to the default syntax (before the update)?

According to https://vi.stackexchange.com/questions/37484/upgraded-my-mac-os-and-now-the-vim-colors-are-different-is-there-an-easy-way-fo I tried adding, set bg=light to my .vimrc but it didn't work.

I'm using now a plugin (Plug 'tribela/vim-transparent') to remove the black background, which is something that really helps; but the font colors are still "shifted". This is what it looks like for me now:

This is what it looks like for me now

The yellow line numbers and the blue “~” symbols used to be both gray. The rest of the font colors seems to be “shifted” from their original colorscheme (elflord) and they are always shifted no matter what colorscheme I use.

this is my .vimrc for reference:

set backspace=2         " backspace in insert mode works like normal editor
syntax on               " syntax highlighting
filetype indent on      " activates indenting for files
set autoindent          " auto indenting
set number relativenumber " turn hybrid line numbers on
colorscheme elflord     " colorscheme desert
set nobackup            " get rid of anoying ~file
set ignorecase          " make search case insensitive
set smartcase           " make search case insensitive
"set bg=light
"autocmd ColorScheme * highlight! Normal ctermbg=NONE guibg=NONE
"hi Normal guibg=NONE ctermbg=NONE
"autocmd SourcePost * highlight Normal     ctermbg=NONE guibg=NONE
"            \ |    highlight LineNr     ctermbg=NONE guibg=NONE
"            \ |    highlight SignColumn ctermbg=NONE guibg=NONE
" ========= Pluggins ========
call plug#begin('~/.vim/plugged')

" For solving color changed issues after mac update
Plug 'tribela/vim-transparent'
" For using fzf on vim
set rtp+=/usr/local/opt/fzf
" Installation of HardTime plug in
" Vim HardTime
Plug 'takac/vim-hardtime'

call plug#end()

Background variable

A strange thing about the background variable is that when I open a vim session at first, it gives these colors, and the value is dark:

dark shell

then, I switch it to light:

light

and finally switch it back to dark, the colors are mostly gray:

gray

The plugin Plug 'tribela/vim-transparent' also stops working after this change, so there seems to be an issue with this background variable...

Any suggestions? :)

1 Answers

We recently rewrote all the built-in color schemes except default.

Whenever possible, we based the rewrite on the highest definition information available, the GUI colors to achieve maximum consistency. In all cases, it means that the TUI experience is brought closer to the GUI experience but it also means that people used to the old, broken, look of their favorite colorscheme might get a shock.

What you get now is how elflord was supposed to look to begin with. If you want the old elflord, you can find it here.

Related