Wednesday, September 30, 2020

Re: `set t_Co=16` in vimrc file has no effect

On Di, 29 Sep 2020, Gary Johnson wrote:

> I'm too busy at the moment to give this a very thoughtful response,
> and it was a while ago that I looked at that code, but it seems that
> there were several things done in response to receiving the
> termresponse, so I don't know that one option would serve all needs.
> In the present case, the only problem seems to be the setting of
> t_Co.
>
> The problem I've had is that I want to set various options and
> highlights depending on the terminal type, but the type is not
> accurately known when vimrc is read, and when the TermResponse event
> is triggered, not everything can be set correctly.
>
> I've resorted to having the termresponse queried in my ~/.bashrc,
> which sets an environment variable that vimrc can then read. It
> works very well for making terminal-dependent settings in my vimrc
> and colorscheme files. When vim queries and receives the
> termresponse itself, it then makes the additional settings you
> mentioned. It would be nice, though, if this could all be done
> within Vim.
>
> I think maybe the whole termresponse behavior should be thought
> through and made more useful, perhaps by adding a later
> TermResponse-like event. I'll try to find some time.

I think this was suggested before. Also the todo file contains a couple
of statements regarding termresponse, e.g.

,----
| Add another autocommand like TermResponse that is fired for the other terminal
| responses, such as bg and fg. Use "bg", "fg", "blink", etc. for the name.
`----

I think Bram also suggested to add additional TermResponse<Event> for
the various term events before.

BTW: Why wouldn't the VimEnter autocommand work? Is that, because
changing terminal options would then require some more initialization or
is that triggered too early?

Best,
Christian
--
Nie in die ferne Zeit verliere dich! Den Augenblick ergreife! Der ist dein.
-- Friedrich Schiller

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200930082632.GD1002%40256bit.org.

No comments: