I have not tried the patch that 9.0.1080 adjusted, but now &tgc doesn't work in kitty. Reproduce:
vim --clean
:colo desert
Observe the desert colorscheme. Now:
:se tgc
Observe what looks like no coloring at all (I see white text on a black background).
For the record, :se term shows xterm-kitty.
I expect &tgc to work.
9.0.1080
Ubuntu 20.04
kitty 0.26.5
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
9.0.1073 has the same problem.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
You need to set t_8f and t_8b:
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
These are apparently missing from the kitty terminfo entry.
Before they were coming from the built-in xterm termcap entries, but since
it turned out that kitty is not xterm compatible these should not be used.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
It's not just truecolor support that 9.0.1073 broke. Focus events will be broken as well. As will bracketed paste. And underlines. And no doubt lots of other things as well.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@brammool I'm hoping you will revert 1073 (and its descendant 1080). I don't know what problem they were meant to solve, but they have made things worse now. Please revert until a better solution is found.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
You need to set t_8f and t_8b:
let &t_8f = "<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "<Esc>[48;2;%lu;%lu;%lum"
Setting those does not fix the &tgc problem. It seems to have no effect at all.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Or just revert your last two commits, and dont worry about the t_ut issue, as I said I will send you a PR for it if I can find the time if not the status quo is preferable.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It works for me, make sure you do this in the right place. If you have it in your vimrc make sure not setting 'term' after that.
I copy and pasted it verbatim into my vimrc. Did github markdown mangle it before I copied it? I am not setting $TERM after that.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
copy it from :h xterm-true-color (and use : or ; depending on what kitty actually uses, according to https://github.com/termstandard/colors it seems to support either one).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Oh and just for the record, I will mention one trick I have used personally in my vimrc for many years for RGB colors and improved performance. Basically you add escape codes to the t_ti setting to change the default background/foreground of the terminal emulator to the colors used by your color scheme. Then you run "hi Normal NONE" to remove all colors from the normal style. And add codes to reset the colors to t_te.
This has the advantage of allowing not requiring vim to set the colors for blank cells since the default color already matches. I noticed significant performance improvements with this trick over a slower network. Sadly I dont have the perf numbers with me.
In theory vim could use this trick out of the box.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
How much does a pardon cost in the US?
Applications generally will not be considered unless the applicant has been discharged from probation or parole for at least 10 years without further criminal activity during that period. There is no fee for applying for a pardon.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
And just for completeness, emacs uses the Tc boolean property from terminfo (a non-standard one introduced by tmux)
emacs-mirror/emacs@f30f531
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
How much of the hard-coded customisations can be externalised to editable .vim config files? They can be distributed as part of the Vim runtime files.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks @brammool That sounds hopeful. Was only suggesting it as an interim possibility as a stepping stone towards that. I think most users wouldn't touch 99% of the runtime files, and Na = 1, ie. Vim. if the Vim project was to maintain a terminfo database, if the ncurses project doesn't keep up. Anyway, I'm now just remembering how many stepping stones end up being the final destination... I'm reading up on https://invisible-island.net/ncurses/#download_database to get my head around that, it has quite the history.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
And here is an update to the kitty FAQ on vim so people can workaround this issue. It contains a (hopefully mostly complete) list of vim terminal settings that vim fails to set.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Please take this text with a grain of salt. It is a mix of personal preferences (such as setting the 'mouse' option), setting options that were already the right value (such as 'ttymouse'),
Nope, vim does not set ttymouse for xterm-kitty before 9.0.1080 and I doubt it sets it after it for other TERM values. Since all terminals actually support SGR for mouse reporting these days, it makes perfect sense to set it unconditionally.
some misleading comments and omits all the things that Kitty does wrong.
Yeah, in YOUR opinion. You've already added what you think of kitty in the vim FAQ, am returning the favor.
It is also missing version numbers
I have zero interest in tracking the random version numbering scheme you use for vim
and forgets to mention that part of the problem is that kitty sets $TERM to "xterm-kitty",
That's a problem for YOU because you think seeing TERM=xterm* is a license to ignore the actual terminfo. A mistake you seem to have finally realized you need to correct.
indicating it is xterm compatible, while it isn't.
No terminal other than xterm itself is xterm compatible. And even xterm is not xterm compatible because most of its features can be configured away by the user.
Thus it tells Vim to use xterm termcap entries and then complains that they are wrong for kitty (e.g. the back_color_erase flag will have the wrong value). Well, that's caused by the $TERM value, not by Vim.
Nope that's cause by vim hardcoding its terminfo for xterm* instead of using the actual terminfo database, because apparently its too hard to read the terminfo database and use hardocded values as fallbacks. Which is BASIC design.
So this is not because Vim is not able to detect features,
It's because you refused to use the existing properties for it. Which I pointed out to you. setrgf/b and Tc. Used by emacs, neovim, tmux, just not vim.
this is because terminal authors have not added the possibility to detect features. Every application has this problem and having each application coding their own solution is the wrong strategy. It is very disappointing to see lots of effort has been put in adding features to terminals and very little has been done making it possible for applications to actually use these features.
I agree that really sucks.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
It contains a (hopefully mostly complete) list of vim terminal features that vim fails to support out of the box.
Thanks to @kovidgoyal for compiling this list, but... why can we not just revert patches 1073/1080 instead of making the kitty users carry around a massive list of settings?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Side note: in that big list of things to set, there is this:
execute "set <FocusGained>=\<Esc>[I"
execute "set <FocusLost>=\<Esc>[O"
Are <FocusGained> and <FocusLost> vim options? They don't appear in the output of :set<CR>. There is no documentation for either of those in the vim help; there are just a couple of spots where the above settings are advised. Nowhere does the vim help say what the are.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
i just saw a joke which make me 🤣 i'd like to share with you all..
// i was thinking what's the most official vim advantage.....
// please continue to discuss the better solution, and nice. :-)
// as for @chdiza after v9.0.1111 i think tgc is working for kitty which those workaround.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Most of the settings are actually not needed, as I pointed out earlier.
I'm not sure why you're saying this. I compared Kovid's list with the output of :set termcap (making sure I did not have anything from his list in my vimrc, apart from t_ut). Setting aside the codes for truecolor stuff (8f, 8b, 8u) because a new patch just built those in, and setting aside t_ut, his list differs from :set termcap on every single code. In every case but one (t_ds), :set termcap shows it to be empty or doesn't show it at all.
Did you mean that the relevant functionality doesn't require Kovid's term codes to be set in vimrc? Or did you mean to say that most things on Kovid's list already match what is in :set termcap. If the latter, it's false. If the former, I am skeptical. E.g., cursor shape won't change when going between normal/insert/replace unless I put what Kovid has in my vimrc.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Not sure yet how to make them easy to find, there is overlap with other functionality, e.g. "FocusGained" is also an autocommand event name. Including <> in the tag name might work.
I don't think you need a <FocusGained> help tag specifically. There should perhaps be something in the help for the :set cmd that shows e.g. a table of everything like that one could set.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The table is below ":help terminal-options".
But it doesn't say anything about <FocusGained> (or lost, or any other constructs). I think you can add a description of those but not worry about tagging them. A user can find that with :helpgrep if needed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The cursor shape settings are user preferences, not terminfo/termcap values.
I don't quite understand that distinction, but given that kitty is the only terminal I've ever used that didn't have cursor shape changes/blinking stuff working correctly out of the box, I would be surprised if there were complaints if those were to become baked in.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
1, most others in that kovid's workaround list in the list is required to manually set something too for gnu-screen, but just if it ran based on xterm-like terminal it had default value.
2, looks except bracketed paste, per on the reproduce steps in #10632 i saw kitty (v0.21.2) also No raw key input: "�[200~foo�[201~" esc chars around with foo same like gnu-screen.
// so it really was a problem of terminal (or something like gnu-screen) or vim?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
so looks there would be no good conclusion shortly :-), but anyway there was workaround mostly.
// this is the last day of 2022, happy new year anyway~ 😄
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()