Bug#860723: vim-runtime: documentation bug in term.txt
James McCoy
jamessan at debian.org
Thu Apr 20 02:22:08 UTC 2017
On Wed, Apr 19, 2017 at 01:59:58PM +0200, Rhonda D'Vine wrote:
> while trying to figure out why I don't get rgb color support in vim
> inside tmux I stumbled upon a documentation bug. :)
>
> in term.txt there are these two lines:
>
> let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
> let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
Which are just a clarification on the preceding paragraph (emphasis
added):
Sometimes setting 'termguicolors' is not enough and one has to set the |t_8f|
and |t_8b| options explicitly. 𝐃𝐞𝐟𝐚𝐮𝐥𝐭 𝐯𝐚𝐥𝐮𝐞𝐬 𝐨𝐟 𝐭𝐡𝐞𝐬𝐞 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 𝐚𝐫𝐞
"^[[38;2;%lu;%lu;%lum" and "^[[48;2;%lu;%lu;%lum" respectively, but it is only
set when `$TERM` is `xterm`. 𝐒𝐨𝐦𝐞 𝐭𝐞𝐫𝐦𝐢𝐧𝐚𝐥𝐬 𝐚𝐜𝐜𝐞𝐩𝐭 𝐭𝐡𝐞 𝐬𝐚𝐦𝐞 𝐬𝐞𝐪𝐮𝐞𝐧𝐜𝐞𝐬, 𝐛𝐮𝐭
𝐰𝐢𝐭𝐡 𝐚𝐥𝐥 𝐬𝐞𝐦𝐢𝐜𝐨𝐥𝐨𝐧𝐬 𝐫𝐞𝐩𝐥𝐚𝐜𝐞𝐝 𝐛𝐲 𝐜𝐨𝐥𝐨𝐧𝐬 (this is actually more compatible, but
less widely supported):
> Actually, after 38 and 48 there should be a semicolon instead of a
> colon. I figured out that part with setting xterm-256color (which
> worked) and screen-256color (which didn't, had it set to empty, which is
> set inside tmux as default).
If have recent enough terminfo files (and tmux), I'd suggest using
tmux-256color instead since that will also enable displaying italic
text.
> Now I don't know if it is a vim bug that t_8f and t_8b are empty when
> therm is screen-256color (I still have to figure out why that is), but
> the documentation bug for those values in term.txt should definitely get
> fixed. :)
I'd check https://gist.github.com/XVilka/8346728 for more details, but
it seems likely it's due to there being disagreement about a standard
way to advertise support for true color.
Neovim seems to handle this a bit better in that you can always "set
termguicolors" but it just won't do anything if it doesn't think the
term supports it.
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
More information about the pkg-vim-maintainers
mailing list