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

Re: 7.2a: No color in xterm?

Expand Messages
  • Marc Haisenko
    ... Well, xterm really has no color support. It was monochrome. You need to set the TERM variable to either xterm-color or even xterm-256color . If you
    Message 1 of 9 , Jul 1, 2008
    • 0 Attachment
      On Tuesday 01 July 2008, Corinna Vinschen wrote:
      > Hi,
      >
      > When running 7.2a in an xterm under Cygwin, the color capabilities
      > of the xterm are not used. Rather, vim uses only standard terminal
      > capabilities like underline, bold, etc.
      >
      > This doesn't happen with vim 7.1. Running vim 7.1 in an xterm under
      > Cygwin shows all colors the xterm is capable of.
      > in the syntax color settings.

      Well, "xterm" really has no color support. It was monochrome. You need to set
      the TERM variable to either "xterm-color" or even "xterm-256color".

      If you don't want to do that, a work-around is descriped in vim's help, "help
      color-xterm".
      Marc


      --
      Marc Haisenko

      Comdasys AG
      Rüdesheimer Str. 7
      80686 München
      Germany

      Tel.: +49 (0)89 548 433 321

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Corinna Vinschen
      ... Ouch! You re right. The new version is accidentally built against termcap instead of ncurses because I missed to install the ncurses-devel package.
      Message 2 of 9 , Jul 1, 2008
      • 0 Attachment
        On Jul 1 16:16, J?rgen Kr?mer wrote:
        > > Corinna Vinschen wrote:
        > >> :version
        > >> VIM - Vi IMproved 7.1 (2007 May 12, compiled Nov 21 2007 17:43:28)
        > >> [...]
        > >> Linking:
        > >> gcc -L/usr/local/lib -o vim.exe -lncurses -liconv -lintl
        > >>
        > >>
        > >> :version
        > >> VIM - Vi IMproved 7.2a BETA (2008 Jun 24, compiled Jun 25 2008 12:24:52)
        > >> [...]
        > >> Linking:
        > >> gcc -L/usr/local/lib -o vim.exe -lm -ltermcap -liconv -lintl
        > >>[...]
        > Sorry, I wanted to write
        >
        > +terminfo
        >
        > vs.
        >
        > -terminfo

        Ouch! You're right. The new version is accidentally built against
        termcap instead of ncurses because I missed to install the ncurses-devel
        package.

        Thanks for noticing!


        Corinna

        --
        Corinna Vinschen
        Cygwin Project Co-Leader
        Red Hat

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Corinna Vinschen
        ... xterm has color capabilities for ages and the terminfo xterm entry contains this information. Of course, when linking against libtermcap instead of
        Message 3 of 9 , Jul 1, 2008
        • 0 Attachment
          On Jul 1 16:37, Marc Haisenko wrote:
          > On Tuesday 01 July 2008, Corinna Vinschen wrote:
          > > Hi,
          > >
          > > When running 7.2a in an xterm under Cygwin, the color capabilities
          > > of the xterm are not used. Rather, vim uses only standard terminal
          > > capabilities like underline, bold, etc.
          > >
          > > This doesn't happen with vim 7.1. Running vim 7.1 in an xterm under
          > > Cygwin shows all colors the xterm is capable of.
          > > in the syntax color settings.
          >
          > Well, "xterm" really has no color support. It was monochrome. You need to set
          > the TERM variable to either "xterm-color" or even "xterm-256color".

          xterm has color capabilities for ages and the terminfo xterm entry
          contains this information. Of course, when linking against libtermcap
          instead of ncurses... ;)


          Corinna

          --
          Corinna Vinschen
          Cygwin Project Co-Leader
          Red Hat

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Marc Haisenko
          ... Yes, but in a lot of places it is still assumed that xterm means monochrome. For example, try OpenSolaris: if TERM=xterm you ll get a monochrome vim.
          Message 4 of 9 , Jul 1, 2008
          • 0 Attachment
            On Tuesday 01 July 2008, Corinna Vinschen wrote:
            > xterm has color capabilities for ages and the terminfo xterm entry
            > contains this information.

            Yes, but in a lot of places it is still assumed that "xterm" means monochrome.
            For example, try OpenSolaris: if TERM=xterm you'll get a monochrome vim.
            Setting it to "xterm-color" or "xterm-256color" fixes that. I ran into this
            when I installed OpenSolaris a few weeks back :-)

            Code that outputs color escape sequences for "xterm" is, in a very strict
            sense, wrong. Of course there's always the "correct-according-to-the-specs"
            vs. "Do-What-I-Mean" conflict :-)

            > Of course, when linking against libtermcap instead of ncurses... ;)
            >
            > Corinna

            Hehe :-)

            Marc


            --
            Marc Haisenko

            Comdasys AG
            Rüdesheimer Str. 7
            80686 München
            Germany

            Tel.: +49 (0)89 548 433 321

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Gary Johnson
            ... The terminfo description for xterm that is distributed with xterm itself, which I would think would make it definitive, says it supports 8 colors.
            Message 5 of 9 , Jul 1, 2008
            • 0 Attachment
              On 2008-07-01, Marc Haisenko <haisenko@...> wrote:
              > On Tuesday 01 July 2008, Corinna Vinschen wrote:
              > > xterm has color capabilities for ages and the terminfo xterm entry
              > > contains this information.
              >
              > Yes, but in a lot of places it is still assumed that "xterm" means monochrome.
              > For example, try OpenSolaris: if TERM=xterm you'll get a monochrome vim.
              > Setting it to "xterm-color" or "xterm-256color" fixes that. I ran into this
              > when I installed OpenSolaris a few weeks back :-)
              >
              > Code that outputs color escape sequences for "xterm" is, in a very strict
              > sense, wrong. Of course there's always the "correct-according-to-the-specs"
              > vs. "Do-What-I-Mean" conflict :-)

              The terminfo description for "xterm" that is distributed with xterm
              itself, which I would think would make it definitive, says it
              supports 8 colors.

              Regards,
              Gary


              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Marc Haisenko
              ... (from XFree86/X.org) ... ...which ALSO is wrong because it supports 256 colors as you verify yourself with the attached script. As you can see, the UNIX
              Message 6 of 9 , Jul 1, 2008
              • 0 Attachment
                On Tuesday 01 July 2008, Gary Johnson wrote:
                > On 2008-07-01, Marc Haisenko <haisenko@...> wrote:
                > > On Tuesday 01 July 2008, Corinna Vinschen wrote:
                > > > xterm has color capabilities for ages and the terminfo xterm entry
                > > > contains this information.
                > >
                > > Yes, but in a lot of places it is still assumed that "xterm" means
                > > monochrome. For example, try OpenSolaris: if TERM=xterm you'll get a
                > > monochrome vim. Setting it to "xterm-color" or "xterm-256color" fixes
                > > that. I ran into this when I installed OpenSolaris a few weeks back :-)
                > >
                > > Code that outputs color escape sequences for "xterm" is, in a very strict
                > > sense, wrong. Of course there's always the
                > > "correct-according-to-the-specs" vs. "Do-What-I-Mean" conflict :-)
                >
                > The terminfo description for "xterm" that is distributed with xterm
                (from XFree86/X.org)
                > itself, which I would think would make it definitive, says it
                > supports 8 colors.
                >
                > Regards,
                > Gary

                ...which ALSO is wrong because it supports 256 colors as you verify yourself
                with the attached script.

                As you can see, the UNIX way of handling output is severely broken and always
                has been because there's just no way that the terminal can tell the system
                and/or application what it CAN support. We only have some files saying what
                the system THINKS a given terminal can support. It doesn't know for sure and
                just hopes for the best.

                Also, see the ncurses FAQ entry about the issue:
                http://invisible-island.net/ncurses/ncurses.faq.html#no_xterm_color

                Sorry for the off-topic line noise, will keep my mouth shut now :-)

                Marc

                --
                Marc Haisenko

                Comdasys AG
                Rüdesheimer Str. 7
                80686 München
                Germany

                Tel.: +49 (0)89 548 433 321

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              Your message has been successfully submitted and would be delivered to recipients shortly.