Hi all,
On Tue, Jan 11, 2022 at 04:10:23PM +0100, Christian Brabandt
<[email protected]> wrote:
> On Di, 11 Jan 2022, Thomas Köhler wrote:
>
> > Actually, please let me know if any changes are required for
> > koehler.vim or let me have a look at the new version if you
> > already made those changes. I would take the opportunity to have
> > a look into those changes (plus into any additional highlight
> > groups that might exist and that I would then fully support).
>
> Improving the existing Colorschemes are worked on in the
> vim/colorschemes repository. For koehler, you can have a look at:
> https://github.com/vim/colorschemes/blob/master/colors/koehler.vim
Thanks.
I just tested a bit and found an issue:
When I run vim in an xterm and then decide to switch to the gui
via ":gui", the colorscheme doesn't fully apply.
The reason for this is that the code that defines everything for
the gui is enclosed in code like this:
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#cd0000', '#00cd00', '#cdcd00',
'#0000ee', '#cd00cd', '#00cdcd', '#e5e5e5', '#7f7f7f', '#ff0000', '#00ff00',
'#ffff00', '#5c5cff', '#ff00ff', '#00ffff', '#ffffff']
hi ColorColumn guifg=NONE guibg=#8b0000 gui=NONE cterm=NONE
[...]
unlet s:t_Co
finish
endif
So in other words, if you start vim in xterm, termguicolors may
not be available and gui_running obviously is not the case, which
leads to g:terminal_ansi_colors not being set and and the "hi"
commands that would setup highlightning for the gui correctly are
not executed. If you then decide to run ":gui", the colorscheme
isn't loaded again, skipping this part completely. I ended up
with gvim and white background even though my colorscheme has
been developed for a black background.
I could fix this by adding the following lines near the beginning
of the file:
augroup COLORSCHEME
au! GuiEnter * colorscheme koehler
augroup END
However, I'm not sure if this is actually a safe way to address
the issue (just using an autocommand didn't work in my case as my
.vimrc contains another "au! GuiEnter ..." which overwrites all
autocommands for the GuiEnter event; that's why I tried the
augroup in the first place). Someone might create a COLORSCHEME
augroup in his .vimrc which might then collide with the one
defined here.
Maybe one of the people working on the colorschemes has a better
idea how to resolve this?
> Best,
> Christian
Bye,
Thomas
--
Thomas Köhler Email: [email protected]
<>< WWW: http://gott-gehabt.de
IRC: tkoehler Freenode: thkoehler
PGP public key available from Homepage!
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/Ye05LUDvom6mKS6R%40picard.franken.de.