Some older compatible terminal apps will complete the procedure for turning on VTP, even if it is not supported.
set vtp=0 turns off VTP. To turn it on again, set vtp=1.
(From vim_use discussion)
https://github.com/vim/vim/pull/5344
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Merging #5344 into master will increase coverage by
0.01%.
The diff coverage is33.33%.
@@ Coverage Diff @@ ## master #5344 +/- ## ========================================== + Coverage 82.23% 82.25% +0.01% ========================================== Files 134 134 Lines 147579 147603 +24 ========================================== + Hits 121364 121412 +48 + Misses 26215 26191 -24
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/term.c | 81.12% <ø> (ø) |
⬆️ |
| src/option.c | 87.01% <33.33%> (-0.06%) |
⬇️ |
| src/terminal.c | 81.74% <0%> (-0.04%) |
⬇️ |
| src/window.c | 88.3% <0%> (-0.04%) |
⬇️ |
| src/ex_docmd.c | 83.76% <0%> (-0.01%) |
⬇️ |
| src/gui.c | 63.73% <0%> (ø) |
⬆️ |
| src/version.c | 92.1% <0%> (ø) |
⬆️ |
| src/popupwin.c | 94.51% <0%> (+0.01%) |
⬆️ |
| src/eval.c | 88.71% <0%> (+0.03%) |
⬆️ |
| ... and 7 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update e2a3f36...d75a0c2. Read the comment docs.
If the value of this option is only 0 or 1, how about use boolean style like forcevtp and noforcevtp?
Or how about disablevtp/nodisablevtp?
I don't think this option should reflect the current status whether VTP is used or not, because we can use has('vcon').
I suggest the following specification:
*'disablevtp'*
'disablevtp' boolean (default off)
global
{not available when compiled without the |+vtp|
feature}
When off, VTP (Virtual Terminal Processing) is automatically used when
Vim detects that it is available. (It is available on win32 console on
Windows 10 version 1703 or later.)
When on, stop using VTP even Vim detects that it is available. If
you are using a 3rd party terminal application which doesn't support
VTP, turn this option on.
(I don't remember well whether VTP is always used on Win10 1703 (or later) or used only when 'tgc' is set or t_Co=256 is set. If later, the above help needs to be updated.)
Yes, don't have multiple statuses.
That way, I will use it almost the same.
I am always grateful for your help.
I can prepare from now.
VTP is turned on in all cases except '16 palette color'. If there is no VTP, only '16 palette color' can be used.
Two messages are not forwarded here.
https://groups.google.com/d/msg/vim_dev/VoTS9bLD5Sw/rLK43E9mBgAJ
https://groups.google.com/d/msg/vim_dev/VoTS9bLD5Sw/r-zSQopmBgAJ
I thought it was a debate from the beginning, so I chose '&vtp'.
Well, double denial is not cool.
Can I use 'virtualterminal' / 'novirtualterminal' ?
Because 'windowsterminal' is also waiting. At this time, automatic detection is not possible.
Searching on the internet I find lots of results for VTP, but none related to our use: Virtual Terminal Processing. Isn't this mostly called "Windows Terminal"? Or is that something else?
The option could be something like "trywinterm" for "try using windows terminal". When on you still only get windows terminal support of it was detected (otherwise it can't work, right?).
And "notrywinterm" if you don't want to try using windows terminal, even when it's detected.
Is that less confusing?
The word 'VTP' was first written that way during the pre-release stage.
The official document at a later date became 'Virtual Terminal Sequences'. 'VTS' ?
This is the sequence supported by ConPTY running on Windows10 'conhostV2'.
There is a Windows Terminal that is supporting the same VTS.
https://github.com/microsoft/terminal/releases
This and ConPTY have the same API, but have a different bug.
The interface and device attribute query (DA) are completely the same as ConPTY, but the behavior is completely different, so the user has to make their own selection.
I brought an implementation of 'trywinterm'. Is this what you mean?
I'm still not clear on terminology. If I understand it correctly, we have three terminal-like environments:
https://github.com/microsoft/terminal/labels?page=2&sort=name-asc
Look at the label Product series. This is the classification method used by Microsoft.
The current situation should be:
Product-Cmd.exe (16 good old colors)
Product-Conhost (Windows 10 cmd.exe that I usually use)
Product-Conpty ('*PseudoConsole' API terminal)
Product-Terminal (Windows Store application)
That's four. There is no common term between them.
Supplement:
The winpty terminal is built into Vim, so it needs support, but I think it is complete.
Product-Powershell looks like Product-Conhost with a different shell. I used to have problems with coloring, but I think it was solved.
Product-WSL behaves like ConPTY. The inside seems to work with ConPTY.
The above is except 3rd-party Terminal.
Can I set a new environment variable VIMVTP?
In order for the command to specify VTP behavior, .vimrc must be able to detect the terminal type.
Also, detecting the type of terminal is not realistic.
The environment on the user's side, probably the environment variable set also changes for each terminal, I want to rely on it.
set "VIMVTP=vtp:enable"
and
set "VIMVTP=vtp:disable,scrollpatch=disable"
I want to write like.
—
There are many terminals, new terminals are increasing, and the combinations are endless.
There is no common API.
Some terminals do not have individual APIs.
Microsoft does not recognize cmd.exe compatible terminals.
Setting the VTP flag will result in an error on older Windows, nothing will happen on compatible terminals (ie the flag will be set).
The meaning was defined for an undefined flag that should have no meaning.
With the advent of WindowsTerminal, "CSI DA (^[[0c)" is destroyed (returns the equivalent of ConPTY) and cannot be relied on.
Currently, cmd.exe compatible terminal is not detected at all.
The appropriate values assume cmd.exe.
Earlier I used a lot of stamina to support an English-only terminal called "Take Command". I can't do that anymore. I think the origin of this PR was its terminal.
So far, I remember that changing environment variables requires special techniques. After all it seems to implement the command.
Forget VIMVTP.
Microsoft does not recognize cmd.exe compatible terminals.
The windows console host hosts all commandline applications on windows. cmd, wsl, vim, powershell, they all use the same VT code.
Vim should be using ENABLE_VIRTUAL_TERMINAL_PROCESSING on all versions of windows after 10240.
Relying on the newly added flag breaks operation on all compatible terminals.
Reports of destruction are all downvote to me.
Hea!
Relying on the newly added flag breaks operation on all compatible terminals.
When an application cannot use ENABLE_VIRTUAL_TERMINAL_PROCESSING, it can implement its own Compatibility mode. This is what Vim does already! 😄
Compatible terminals simply ignore the added flag.
Therefore, the application needs to provide a new means for manually selecting the sequence to be transmitted. And this issue exists.
The difference between the position of saying "follow me" to all compatible terminals and the position of not being able to say it.
This does not need to be an option.
Can we do this?
ENABLE_VIRTUAL_TERMINAL_PROCESSING
This would make Vim work very well on all versions of Windows 10 and in new terminals that support VT (like ConEmu)
The problem is how to listen to Vim's petition from a VT unsupported terminal (paid product!) That returns "TRUE" even after trying the flag. Again, I have no authority.
In other words, I have no right to answer. Just follow.
—
Now looking at this patch again, I see that it makes a difference whether the option is never set, set to true or set to false. Problem is that it's then not possible to go back to the initial situation. It would be better to have an option with three values: Detect the terminal, force-disable vtp, force-enable vtp.
Then we can call the option 'winterm' with the values empty (default), "off" and "on".
Unfortunately I don't feel confortable making these changes without a setup to try it out. And Nobuhiro appears to be inactive. Anybody else wants to take this over?
Closed #5344.