Loading ...
Sorry, an error occurred while loading the content.

RE: Checking xterm version

Expand Messages
  • Ronald Schild
    ... Yes, and it works perfectly now :-) ... Correct. Exactly this was my intention. ... Currently I don t have a clever use for this. There is a freeware
    Message 1 of 9 , Feb 21, 2000
    • 0 Attachment
      Bram wrote:

      | Ronald Schild wrote:
      | > Most of our company's customers use the SmarTerm telnet client for Unix
      | > adminstration (or we for them, respectively), so I'm very interested to
      | > make vim work with it as well as possible. I can persuade it to send
      | > its version number within the answer to t_RV (but with a '.' only), and
      | > I'd check it in the autocommand (esay with "if v:termresponse =~ ..."),
      | > and if it is a recent version that supports ANSI colors, I set can set
      | > 't_Co', 't_AF' and 't_AB' to appropriate values.
      | Aha, you want to do some terminal-dependent things yourself.

      Yes, and it works perfectly now :-)

      | > But 'ttymouse' is set to "xterm2" only
      | > if (tp[2] == '>' && j == 2 && extra >= 95)
      | > To be sure we could add "&& vim_is_xterm(T_NAME)" here.
      | >
      | > However, these conditions should not be necessary for applying the
      | > autocommand. Then it's possible to "set t_RV=<Esc>[c" (without '>') to
      | > request the Primary Device Attribute instead of the Secondary (which
      | > actually causes the response "<Esc>[? ... c" on almost every terminal).
      | > Due to my VT420 handbook this shows some capabilities of the terminal,
      | > e.g. whether it is able to switch to 132-column-mode. I can imagine
      | > this to be useful for someone.
      | Ok, you could set t_RV to any escape sequence, so that Vim will send it to
      | the terminal and expects some response. Whatever the response is, it
      | would put it in v:termresponse and trigger the autocommand. The check
      | whether "xterm2" is to be used is separate. Should be done before the
      | autocommand, so that the user has a chance to change it.

      Correct. Exactly this was my intention.

      | > I wonder if it would be even more useful to allow other responses too,
      | > that don't end with 'c'.
      | This is getting complicated. What would it be used for?

      Currently I don't have a clever use for this. There is a freeware QTerm
      (http://www.magnicomp.com/qterm/) that queries terminals to find out what
      kind of terminal is responding. Is uses a table of common query sequences
      and possible terminal responses. But I'm not sure if Vim should try to do
      that. As you said, it's really getting complicated.

      Ronald Schild
      at work: mailto:rs@...
      private: mailto:rs@...
    Your message has been successfully submitted and would be delivered to recipients shortly.