Closed protegh closed 2 years ago
Depends on what you want exactly:
If you are into pt 3. we can try to do it if we agree on what is "exactly the same".
having said that -- there might be bugs in remakes, so if you have found any, please specify what exactly is wrong with new slate.
For the moment i'll use your point 1. But how long will the legacy color schmes work with vim9, vim10, ...? So point 3 would definitely be nice to have.
What's wrong with new slate? E.g. when opening a bash script with syntax highlighting on all the colors are different:
Please specify environment too, I guess this is not gvim.
t_Co
?$TERM
and terminal emulator?And if you show the screenshots too, would be very helpful
# echo $TERM
xterm-256color
# vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 15 2022 11:59:37)
Included patches: 1-99
Modified by Gentoo-9.0.0099
Compiled by portage@localhost
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_any_white
+arabic +find_in_path +mouse_xterm -tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang -terminal
-autoservername -footer -mzscheme +terminfo
-balloon_eval +fork() +netbeans_intg +termresponse
+balloon_eval_term +gettext +num64 +textobjects
-browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand -perl +title
+channel +ipv6 +persistent_undo -toolbar
+cindent +job +popupwin +user_commands
+clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall -python3 +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
-cscope +localmap -ruby +wildignore
+cursorbind -lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con +mksession +smartindent +writebackup
+diff +modify_fname +sodium +X11
+digraphs +mouse -sound +xfontset
-dnd -mouseshape +spell -xim
-ebcdic +mouse_dec +startuptime -xpm
+emacs_tags +mouse_gpm +statusline +xsmp_interact
+eval -mouse_jsbterm -sun_workshop +xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
system vimrc file: "/etc/vim/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=haswell -O2 -pipe -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -L/usr/local/lib -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lelf -lsodium -lrt -lacl -lattr -lgpm
Terminal emulator is xfce4-terminal-1.0.4 but I don't know where to get t_Co
.
Colors of the new slate scheme:
Colors of the lagcy slate scheme:
Thank you!
Terminal emulator is xfce4-terminal-1.0.4 but I don't know where to get t_Co.
In vim :set t_Co?
should show number of colors available for vim.
Also try to to do :set t_Co=16
and compare results -- it would use current palette of your terminal as legacy slate did.
:set t_Co?
gives t_Co=256
Colors with :set t_Co=16
:
Could you also paste here the bash script to check against?
So basically, with 256 colors you see slate in "all its glory", using all available colors to mimic what it offers to gui users.
With 16 colors (t_Co=16
) you should be able to see almost the legacy slate, apparently here are the "bugs".
Note, comments were different for gui and tui in slate, we were trying to make them the same for all, using what was defined for gui.
Not sure about the rest though.
Note, comments were different for gui and tui in slate, we were trying to make them the same for all, using what was defined for gui.
But as I never used gvim but only vim in terminal isn't then the only "bug" (from my perspective) that you decided to use the gui colors from now on instead of my beloved tui colors?
But as I never used gvim but only vim in terminal isn't then the only "bug" (from my perspective) that you decided to use the gui colors from now on instead of my beloved tui colors?
And in my terminal legacy slate is unreadable and that was the main usability issue of all legacy colorschemes. They assume terminal is dark, probably even black or vice versa. In my other terminal it is readable but has completely different colors that you have on your screenshot.
Ah, I see. My terminal background is black since many, many years (20 years I guess).
As I see it now:
Once 16 and 8 colors are fixed (in some way), users should be able to set t_Co=16
to get "legacy vibes" of slate.
Still not sure about comments, @romainl, I think we can make them yellow for 16/8, right?
So maybe the colors also depend on the color style of the desktop? It's xfce4 with Adwaita Style in my case.
So maybe the colors also depend on the color style of the desktop? It's xfce4 with Adwaita Style in my case.
For legacy slate and for new slate with t_Co=16
colors depend on terminal palette, which is different for different terminals.
So this is OG GUI vs TUI slate:
Aligning t_Co=16
, left is remake, right is OG:
for 8c it is "impossible" to align as OG slate uses numbers (11 for comment) and we use colornames (yellow for comment).
With t_Co=8
11 is bright yellow, yellow
is dark yellow. Anyway, I made them yellow bold:
left is remake, right is OG (t_Co=8)
@protegh could you pls check slate from PR with set t_Co=16
?
Now I stop here as it should be decided who we are going to upset, ppl who used to use GUI slate or ppl who used to use TUI slate...
@habamax we already made that decision: the GUI is the single source of truth.
@protegh could you pls check slate from PR with
set t_Co=16
?
Colors changed but not even near OG slate:
I downloaded https://raw.githubusercontent.com/vim/colorschemes/635f5ebe86d5ec04979ccb9f70752984a1601de0/colors/slate.vim put it in my ~/.vim/colors/
as slatePR.vim
, opened the file, did :colo slatePR
and then :set t_Co=16
.
It looks like not updated slate for me, this is what I see for t_Co=16
:
@protegh after set t_Co=16
re-run :colo slatePR
Oh, I thought tis would be commutative.
Now it's better but not exactly the same as yours (could this be caused by the different displays we use? Something like color temperature?):
But didn't you say you "made them yellow bold" about comments? They are still grey.
Oh, I thought tis would be commutative.
It would work without re running slate once it is pushed into vim.
Now it's better but not exactly the same as yours (could this be caused by the different displays we use? Something like color temperature?):
No it uses current terminal palette, mine is different to yours.
But didn't you say you "made them yellow bold" about comments? They are still grey.
I did, but the general approach is to use GUI colors if those are available. For slate it is gray.
I did, but the general approach is to use GUI colors if those are available. For slate it is gray.
Is there a way I could overwrite this to get yellow comments?
Is there a way I could overwrite this to get yellow comments?
As stated in the vim help (:h colorscheme
then scroll down a bit):
augroup my_colorschemes
au!
au Colorscheme slate hi Comment ctermfg=yellow
augroup END
colorscheme slate
I agree that using GUI colors as the only reliable source of truth is the right choice, short of asking original authors to provide how they meant their color schemes to look like. For what we know, slate may use ctermfg=11
just because in its author's environment that happened to look grayish. So, (typically) yellow comments may as well be an accident.
If one really likes the yellow comments, there are instructions to override a color scheme's highlight group in one's vimrc.
Also, a more general comment: with t_Co=16
(or 8
), a color scheme relies on a terminal's palette. One may make an argument, then, that it's only logical that it should also use the terminal's background color in that case. After all, even with a defined background, the color scheme might look completely wrong.
Thanks for all your effort. As I learned now how to override the colorscheme settings I would suggest that you define the slate colors as you think and I then do some overrides to get my familiar colors.
Will happily test on FreeBSD and HP-UX tomorrow.
Tried the updated slate on HP-UX and FreeBSD. It looks much better now, but the comment is still pale/dark gray on black which is hard to read:
We already went through this a few times…
:help :colorscheme
.We won't make the comments yellow.
We already went through this a few times…
* We base our remakes on the GUI specs if they exist. * TUI slate is based on GUI slate. * Comments are gray in GUI slate therefore they are gray in TUI slate. * In 16 colors, Vim colorschemes use the user-customisable palette of the terminal emulator. * Being user-customisable and having different defaults across terminal emulators, the palette of the terminal emulator can't be trusted. * The original author of slate chose color 11 for comments in TUI, which is vaguely expected BUT NOT GUARANTEED IN ANY WAY to be "bright-yellow-ish" IN SOME DEFAULT PALETTES. * YOU are used to comments being a particular yellow, OTHERS may be used to a different color. For example, [this](https://www.google.com/search?q=%23657b83&rlz=1C5GCEM_en&oq=%23657b83&aqs=chrome..69i57j0i30j0i15i30l2.824j0j7&sourceid=chrome&ie=UTF-8) is 11 for people using the hugely popular Solarized palette. * If you want the original slate, it's [here](https://raw.githubusercontent.com/vim/colorschemes/master/legacy_colors/slate.vim). * If you want to tweak the remake, follow the instructions under `:help :colorscheme`.
We won't make the comments yellow.
I accept that especially because you took the time to explain everything in detail!
How can I get back exactly the colors of the vim82 color scheme slate?