termguicolors and xterm

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

termguicolors and xterm

Chris Jones-44
I came across a new 'termguicolors' option in Vim.

I took a closer look using KDE's Konsole and gnome-terminal and it
appears to work out of the box: just a matter of adding a ":set
termguicolors" statement to your ~/.vimrc and 16M colors color schemes
written with gvim in mind are correctly displayed on these two
terminals.

Since I do not normally use Konsole or gnome-terminal I proceeded to
take a look at xterm where I was unable to get this new Vim magic to
work.

Has anyone been able to get the 'termguicolors' option to work on xterm
or does xterm altogether lack the capability?

Tested with XTerm(327) on debian stable (stretch).

Thanks,

CJ

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: termguicolors and xterm

Chris Jones-44
On Sat, Jan 19, 2019 at 05:43:24PM EST, Chris Jones wrote:

> I came across a new 'termguicolors' option in Vim.
>
> I took a closer look using KDE's Konsole and gnome-terminal and it
> appears to work out of the box: just a matter of adding a ":set
> termguicolors" statement to your ~/.vimrc and 16M colors color schemes
> written with gvim in mind are correctly displayed on these two
> terminals.
>
> Since I do not normally use Konsole or gnome-terminal I proceeded to
> take a look at xterm where I was unable to get this new Vim magic to
> work.
>
> Has anyone been able to get the 'termguicolors' option to work on xterm
> or does xterm altogether lack the capability?
>
> Tested with XTerm(327) on debian stable (stretch).
>
> Thanks,
>
> CJ
>
Jury still out on this one?

Thanks,

CJ

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: termguicolors and xterm

Josh Holland
In reply to this post by Chris Jones-44
On Saturday, 19 January 2019 22:43:30 UTC, Chris Jones  wrote:
> Has anyone been able to get the 'termguicolors' option to work on xterm
> or does xterm altogether lack the capability?

termguicolor works for me in xterm 330 on Ubuntu 18.04 (as in, I can see colours with it set; I think they are quantized to the nearest available colour in the 256-colour palette, which is an xterm limitation).

Thanks,
Josh

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: termguicolors and xterm

Josef Fortier
In reply to this post by Chris Jones-44
This was helpful to me in setting up termguicolors (not on xterm) https://gist.github.com/XVilka/8346728

I use stterm. That in mind, here are a few suggestions:

1) use one of the truecolor test scripts to verify that your xterm implements truecolor. This is useful not only for obvious reasons, but as a test of any intermediaries that might be in place (in my case tmux). If you can get the test scripts to output truecolor, you should be able to get vim to work.

2) Vim's recognition of terminal support is not perfect. The ":help termguicolors" entry suggests a few ":set &t..." settings. FWIW those did not work for me, but similar strings (google searched) did work. Without the correct strings, the visual results of setting termguicolors will be obviously bad (essentially no colors).

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: termguicolors and xterm

trialero
In reply to this post by Josh Holland
On Mon, Mar 04, 2019 at 04:06:19AM -0800, Josh Holland wrote:
> On Saturday, 19 January 2019 22:43:30 UTC, Chris Jones  wrote:
> > Has anyone been able to get the 'termguicolors' option to work on xterm
> > or does xterm altogether lack the capability?

I don't know if it works for you and I don't have any experience with
'termguicolors' but following lines are part of my vimrc:

43 if has('gui_running')
44         colorscheme molokai_dark
45         set guifont=Monospace\ 10
46         set columns=85 lines=30
47 elseif has('x11')
48         colorscheme molokai_dark
49         set guifont=Monospace\ 10
50 "       set columns=85 lines=30
51 else
52         colorscheme evening
53         set t_Co=256
54 endif
           
I use both the console and the xterm terminal emulator. Since xterm has
a lot more colors than the console, I use the above do trigger the right
colorscheme for that environment. The top 'if/elseif' part looks double
as x11 and GUI are the same for the user of a system. Somehow I noticed
differences eg. between different terminal emulators.

I hope you can use this to resolve your problem on coloring vim and
syntax.

//meine

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.