Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] vi weird when I ssh to one machine
- Date: Sun, 14 Feb 2021 22:10:02 +0900
- From: "Stephen J. Turnbull" <turnbull.stephen.fw@example.com>
- Subject: Re: [tlug] vi weird when I ssh to one machine
- References: <420c0750-b78f-a51c-c7ff-e8e6945b9f84@dcook.org> <20210205222718.GA18140@fluxcoil.net> <24606.21289.40467.646036@turnbull.sk.tsukuba.ac.jp> <f45e149e-f166-49e0-78bb-90d96e06f004@dcook.org> <906cabdc-010e-9ead-f462-a87d11433459@dcook.org>
Darren Cook writes: > Hope you are all okay, not too shaken :-) Shaken but not stirred. > The working machine writes: > write(1, "\33[?2-- INSERT -- ____ 1,1 ____ All) = 62 > > (Where I've put ____ is a bunch of spaces, just reformatting for email) > > The problem machine writes: > write(1, "\33[?2004l\33[>4;m", 14*[>4;m) = 14 > > Where I've put "*" is 0x0018. I suspect there's a problem with the transcription (the strings aren't terminated with quotation marks, the control sequences seem to be incomplete; maybe there are control codes embedded in the strings?) I don't know what the working machine is trying to do, the sequence "\33[?2" (where the \33 represents the ASCII ESC control character) should be followed by optional digits and punctuation and terminated by a letter or certain punctuation, but not including "-". The "-- INSERT --" string looks familiar, I guess this is displayed by vi as a mode line. So the sequence is incomplete and there are at least a dozen valid sequences beginning with "\33[?2". One interesting possibility is "\33[?2J", which means "Erase in Display (DECSED), VT220, Ps = 2 ⇒ Selective Erase All", one way to clear the screen. Aside from the poor formatting of the strace output, that seems pretty consistent with what I would expect vi to do on startup with no file. The non-working machine is bizarre. "\33[?2004l" appears to be a complete sequence, which means "DEC Private Mode Reset (DECRST), Ps = 2 0 0 4 ⇒ Reset bracketed paste mode", whatever that is. "\33[>4;m" sounds plausible, but I don't know what it actually does: "Set/reset key modifier options (XTMODKEYS), xterm, Pp = 4 ⇒ modifyOtherKeys". Presumably it has to do with whether you can use Alt combinations as in Emacs (which interferes with function keys). I have no idea what the 0x18 (Ctl-X) means; it doesn't appear to be an xterm control sequence. My guess is that either the two terminfos differ in the terminal initialization sequence, or the initialization sequence is customized in at least one of the machines. The bizarre definitions are copied from https://invisible-island.net/xterm/ctlseqs/ctlseqs.html which is for masochists. (Don't copy any commas when copying to a search box, I changed some periods to commas so they read better, and the "Px =" parameter definition phrases usually have other text after the function name but before the parameter so copying the whole thing won't work for sure.) Steve
- References:
- [tlug] vi weird when I ssh to one machine
- From: Darren Cook
- Re: [tlug] vi weird when I ssh to one machine
- From: Christian Horn
- Re: [tlug] vi weird when I ssh to one machine
- From: Stephen J. Turnbull
- Re: [tlug] vi weird when I ssh to one machine
- From: Darren Cook
- Re: [tlug] vi weird when I ssh to one machine
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] vi weird when I ssh to one machine
- Next by Date: Re: [tlug] vi weird when I ssh to one machine
- Previous by thread: Re: [tlug] vi weird when I ssh to one machine
- Next by thread: Re: [tlug] vi weird when I ssh to one machine
- Index(es):