-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E420 when hi Normal has ctermbg=None #131
Comments
I had tried to use hi link CtrlPLinePre Ignore And it seems to work great. |
I already made some changes that should (unintentionally) fix this, I think. Let me know if this doesn't return either
|
This returns -1 for me. So, hi link CtrlPLinePre Ignore isn't a better approach? (I think all colors should be defined by color scheme and plugins should only use hi link) |
Because not every colorscheme uses guifg=bg or ctermfg=bg for Ignore (molokai for example, uses a visible color for this group's foreground). So it's better using the Normal's bg directly. |
Well, it is all about choice. If a colorscheme choose to use a visible color for Ignore, then it does meant to let user see what is intend to be hidden. And if a user choose to use such a colorscheme without any modification, this means he/she choose to see the hidden text (with a dim color, of course). When a colorscheme set ctermbg=None and use a background picture, it is impossible to hide the text completely, but the colorscheme may choose a foreground color very close to the background picture in order to make the text almost invisible, and define that group to be "Ignore". |
This should be fixed in 75e31e9. It's also now possible to change the default highlighting for every part of the prompt. |
When Normal highlight has ctermbg=None, this means a transparent term background, i.e. the same color as the background of Term Client Program, if the term client supports a picture as background, then the background will be the picture. This technique was widely used when we need a background picture for term client.
Vim will issue E420 when ctermfg=bg, if ctermbg=None
The following line:
sil! exe 'hi CtrlPLinePre '.( has("gui_running") ? 'gui' : 'cterm' ).'fg=bg'
should not be used since ctermfg=bg may fail.
Well, I don't know why ctermfg=bg is used, do you want to Hide the foreground? Will this work?
hi link CtrlPLinePre Ignore
The text was updated successfully, but these errors were encountered: