0

I start up vim from mac terminal like so:

vim filename

But my colorschemes do not load properly (I tried loading desert.vim, desert256.vim and solarized.vim).

desert256.vim has a black background and white text.

desert.vim doesn't make a difference.

solarized.vim has blue font and grey background.

I tried a lot of solutions online, but cannot get it to work. (like adding lines to .vimrc). My current .vimrc is:

syntax enable
set background=dark
colorscheme desert256
set t_Co=256
let colors_name = "desert"
  • You shouldnt need to let colors_name or set t_Co (it should be automatically detected). Can you explain what you mean by “do not load properly”? Add your vim version as well. Is this a coloring issue, or is the colorscheme command failing (check runtimepath)? – D. Ben Knoble Feb 26 at 15:11
  • if you run colorscheme darkblue does it change your background to dark blue? – Maxim Kim Feb 26 at 16:30
  • Add associated pictures, it would help us understand. – klaus Feb 26 at 17:49
1

It is very common for a fancy colorscheme (such as solarized, base16-*, you name it) to require palette changes in a terminal. Without it you will face ugly colors.

I generally avoid such colorschemes in terminals and use them only in GUI vim.

To solve it -- goto the place you have obtained colorscheme, find description on how to properly use it. Usually it is smth about changing first 16 terminal colors. Solarized example: https://github.com/altercation/solarized . There you can find how to redefine your colors for different stuff including osx terminal.

PS

There are also colorshemes that are not made with terminals in mind -- they define only gui colors.

0

Look for colorschemes that are compatible with the terminal and the mac OS terminal colors. Here is a list of them (search for the word "solarized"): https://github.com/rafi/awesome-vim-colorschemes

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.