You are not logged in.
I installed both termite and lxterminal and set the same color palette for both. But the colors don't match. Additionally, in termite some characters/words are displayed in bold font while they are normal in lxterminal (bold font is enabled for both, and works for both, but not identically). For comparison, I also tried xfce4-terminal, which shows the same colors and bold/non-bold behaviour as lxterminal. Any idea where the differences are coming from?
Edit: Changed the title. The terminals themselves actually show the same colors, but vim does not. I tried with an empty vimrc. Please see the screenshot for differences: 
Last edited by FlowIt (2017-04-17 20:05:29)
Offline
Those terminal emulators all seem to be built with different versions of vte. Maybe that is why you are seeing a difference.
Offline
Can you post some screenshots displaying the difference.
Offline
Please see the edited first post for a screenshot. Color differences should be obvious. The difference in bold font can be seen directly after the preamble.
As for vte: I use lxterminal-gtk3 with vte3-ng, so both lxterminal and termite use the same version.
Offline
Try answer:
open your .vimrc file and add set term=xterm-256color anywhere before setting the color scheme.
Edit: More hints.
Last edited by brebs (2017-04-15 12:30:57)
Offline
According to this page, lxterminal sets $TERM to xterm, which only supports 8 colors. This would explain the differences.
I am not sure if we are now going too far away from the topic, but I am interested in where I can find the "meaning" of the different colors. For what is color1 used, for what color2, etc. I assume this has to be standardized, but I couldn't find any reference.
Offline
Edit3: Reading my posts again now, makes me think I went far too off topic. If you are interested in true colors go ahead, otherwise ignore it.
See this excellent reference about the support for true color for all kind of terminals: https://gist.github.com/XVilka/8346728
(It explains the different color types in the beginning very good)
The first question should always be are you using a 16color theme or 256color? It's important because the theme creators intended the use of the exact colors and when you use a 16color theme with 256 color palette it does not have the intended look, same is true for the other way around.
Note that you can force vim to use a specific palette with eg for 256colors 'set t_Co=256' but setting the term variable is maybe a more solid approach. (I would set it somewhere else and not in vimrc though..)
Vim has no true color support btw, so using a true color theme in vim will cause issues as well.
Edit: Ah it has indeed, can be enabled with set termguicolors like in nvim
Edit2: You could try it out, termite has good true color support and it's definitely worth it.
I switched last week from urxvt to termite for true color support and I regret I did not earlier.
Last edited by svnset (2017-04-15 18:21:34)
After one has played a vast quantity of notes and more notes,
it is simplicity that emerges as the crowning reward of art. - Chopin
Offline
Definitely something interesting to read.
I still have the issue with the bold parts. I want to set allow_bold = true in the termite config file, for example for the output of ls where directories should be bold. But as seen in the screenshot, vim prints more in bold than they should. I still use an empty vimrc. I am not sure where I should look, how the system decides how to print, if it's a terminal or vim thing.
Offline
It's definitely a vim thing. You only can set bold (or cursive) in your terminal. With real bold support it is then able to print the desired color in bold. With fake bold support it prints for eg. Color0 (black) as Color8. So the color pairs are: 0 8, 1 9, 2 10... An example would be urxvt (fake bold) and termite (real bold)
Now back to vim.
You will find your answer in the theme itself. I assume you use the default vim theme if I understand you correctly. The theme has to handle bold support, if it does not it will not work and you should turn bold support off. Have a look at '/usr/share/vim/vim80/colors'. There you'll find vim's default themes. If you are not using your own colors the default is set to ron.vim if vim detects background =dark. So look at it and see where the bold colors are set ![]()
Edit: typo
Last edited by svnset (2017-04-16 10:45:32)
After one has played a vast quantity of notes and more notes,
it is simplicity that emerges as the crowning reward of art. - Chopin
Offline
For what is color1 used, for what color2, etc. I assume this has to be standardized
It's a bit off topic, but to answer this - no, that's not really standardized in any strict way. Any user can set any of their 8, 16, or 256 colors to anything at all that they'd want.
There are some general conventions that are frequently assumed of 0-7 being black, red, green, yellow, blue, magenta, cyan, and white/grey respectively, and 8-15 being "bright" versions of those colors. Then a bit less stringently, but frequently that 16-231 follow the "xterm color cube" of a 6x6x6 cube with axes of varying red, green, and blue values followed by a 24-step grayscale gradient.
But note that even the above expectations (not requirements) and no where near precisely quantitative. Every terminal I know of will - by default - use some shade of red for color1 and some shade of green for color2, but unless you explicitly set it yourself, there can be great variation in which shade of red or green are used.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for all the great information, this was definitely interesting. To finally formulate an answer: The underlying issue here was that lxterminal and termite, despite being both built on top of vte, advertise support for different numbers of colors (8 for lxterminal and 256 for termite). It was then vim which made use of more colors and their bold variants which led to the difference in appearence. The short term solution for me was to to add an
set t_Co=8to my vimrc, the long term solution will be the hunt for a vim colorscheme that does what I want. Solved!
Offline
8 for lxterminal
According to various web pages, LXTerminal supports 256 colors.
Presumably, you are only missing, in BASH:
export TERM=xterm-256colorAlso, check that you have /usr/share/terminfo/x/xterm-256color (provided by the ncurses package).
My xfce4-terminal (different distro to Arch) uses VTE 0.46.1 (i.e. vte3 package), whose configure script contains:
VTE_DEFAULT_TERM=xterm-256colorWhereas VTE 0.28.2 only has:
--with-default-emulation=xtermTherefore, I would speculate that the bug, of $TERM not being set to xterm-256color, could be in the vte package - maybe it should be compiled with the option:
--with-default-emulation=xterm-256colorNote: The above is untried speculation.
Offline
Manually setting TERM is always a bad idea. Any decent terminal emulator will have a configuration where you can specify this ... however, after a bit of looking, I don't see any options for lxterminal.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Well, my detail above, happily explains why I used to have to pollute my ~/.bashrc with logic to set $TERM (for decent colors in Vim, when xfce4-terminal was linking to the old vte 0.28.2), but don't have to anymore ![]()
When not inside Xorg, my $TERM is automagically set to "linux", so that's good.
Offline
agetty sets TERM to "linux". Terminal emulators will set TERM to something else. Frankly, LXTerminal is *only* one I've ever known to not have options for this. For xterm, aterm, rxvt, and all their derivatives, this option can be set on the command line or in Xresources (you can configure it, but not by setting the environment variable directly - you tell the emulator what you want, and when it gives you that it sets the TERM value to reflect that change). Screen, tmux, and fbterm also have options to specify a terminal value - and the few other terminal emulators I've tried do as well.
I strongly suspected that this was just failure to read the lxterminal manual and/or properly configure it. But despite trying I can find no options to do so. That's really just silly - the solution is to not use lxterminal, or to report this to the lxterminal developers.
EDIT: well that's completely ridiculous. LXterminal has "xterm" hard coded as the only possible setting of the terminal emulation value. If you want to change that to something else (e.g. to be configurable, or just to have a better default) it is set on line 1129 of lxterminal.c
Last edited by Trilby (2017-04-17 23:11:51)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline