altercation / vim-colors-solarized

precision colorscheme for the vim text editor
http://ethanschoonover.com/solarized
6.58k stars 1.75k forks source link

[CRITICAL] Won't work with latest Vim build or any future builds in gnome-terminal #214

Open lifecrisis opened 4 years ago

lifecrisis commented 4 years ago

Greetings:

I want to draw special attention to an issue that has been raised in the Vim project with regards to terminal color schemes in general. I also want to note that this directly affects the compatibility of this plugin with Vim.

As of Vim v8.1.1146, the Solarized color scheme is no longer functional in gnome-terminal. I feel that this is critical, as it means that many users will need to move to a new color scheme if nothing is done to fix the problem. See vim/vim#5574.

My set up is as follows:

A screenshot of this configuration follows:

bug

As you can see, the terminal window is barely usable, and the current line number (note that number and relativenumber are set) doesn't look as it should. See below for a screenshot of the expected appearance (before Vim patch 8.1.1146).

no_bug

I have used Solarized for many years in gnome-terminal without issues. It's wonderful on the eyes! I really hope that this issue can be resolved and that the plugin can be restored to proper functioning with the latest Vim build.

Thanks in advance for any help! Also, thank you for such a valuable addition to the Vim plugin ecosystem.

Best, Jason

ghost commented 4 years ago

Same problem with neovim v.0.4.3, KDE Konsole (20.04.0) and Manjaro 20.0

rysktky commented 4 years ago

Same problem with Fedora 32 , both gnome-terminal and Kitty, when I run :terminal in side VIM

rysktky commented 4 years ago

@lifecrisis and @roccr

I guess the problems is VIM tries to read 256-color , instead of 16, when opening a :terminal.

Use 256 colors with 'let g:solarized_termcolors=256' or any way to use 16 colors seems to be working. ('let g:solarized_termcolors=16' did not work for me though)

Examples to force using 16 colors could be,

 set t_Co=16   (for vim. Make sure your terminal does not override this value. Check ':echo &t_Co' inside of vim, if not working)
 set -g default-terminal xterm-16color   (for tmux)
 export TERM=xterm-16color   (for shell)

I am not really sure how above examples can affect other apps(Please tell me pros and cons, if you have any!!)

lifecrisis commented 4 years ago

On Sun, 2020-05-10 at 02:49 -0700, rysktky wrote:

set t_Co=16

This was the only part of your suggestion that helped me. It seems that setting this value explicitly to 16 will fix the display of colors. It could be slightly off, but the difference is not immediately obvious.

export TERM=xterm-16color

I can't recommend this for anyone. Your terminal is what it is, and setting this variable to something else will "lie" to applications about their environment.

j0k4rX commented 3 years ago

same here with linuxmint .. Help!

s3rgeym commented 3 years ago

image

rysktky commented 3 years ago

@tz4678 , have you set the color palette of your terminal emulator to Solarized palette?

j0k4rX commented 3 years ago

it worked for me.. all you have to do is add this piece of code in your .vimrc or init.vim

let g:solarized_termcolors=256

make sure, your terminal theme is set to solarized

iafisher commented 1 year ago

let g:solarized_termcolors=256 worked for me as well, but I found it was crucial to put it before the colorscheme solarized line, or else it wouldn't work.