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

Re: 7.2a: No color in xterm?

Expand Messages
  • Jürgen Krämer
    Hi, ... +viminfo vs. -viminfo Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it
    Message 1 of 9 , Jul 1, 2008
      Hi,

      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.
      >
      > The entire environment is otherwise identical. Both versions are build
      > as HUGE versions:
      >
      > :version
      > VIM - Vi IMproved 7.1 (2007 May 12, compiled Nov 21 2007 17:43:28)
      > Compiled by corinna@coffee
      > Huge version without GUI. Features included (+) or not (-):
      > +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
      > -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
      > +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
      > +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
      > +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
      > +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
      > +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
      > -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
      > -netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
      > -python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
      > -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
      > -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
      > +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
      > +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
      > -xterm_clipboard -xterm_save
      > system vimrc file: "$VIM/vimrc"
      > user vimrc file: "$HOME/.vimrc"
      > user exrc file: "$HOME/.exrc"
      > fall-back for $VIM: "/usr/share/vim"
      > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
      > 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)
      > Compiled by corinna@cathi
      > Huge version without GUI. Features included (+) or not (-):
      > +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
      > -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
      > +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
      > +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
      > +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
      > +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
      > +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
      > -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
      > +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript
      > +printer +profile -python +quickfix +reltime +rightleft -ruby +scrollbind
      > +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
      > +tag_old_static -tag_any_white -tcl -terminfo +termresponse +textobjects +title
      > -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
      > +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
      > -xterm_clipboard -xterm_save
      > system vimrc file: "$VIM/vimrc"
      > user vimrc file: "$HOME/.vimrc"
      > user exrc file: "$HOME/.exrc"
      > fall-back for $VIM: "/usr/share/vim"
      > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
      > Linking:
      > gcc -L/usr/local/lib -o vim.exe -lm -ltermcap -liconv -lintl
      >
      >
      > What could be the reason?

      +viminfo

      vs.

      -viminfo

      Regards,
      Jürgen

      --
      Sometimes I think the surest sign that intelligent life exists elsewhere
      in the universe is that none of it has tried to contact us. (Calvin)

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Jürgen Krämer
      Hi, ... Sorry, I wanted to write +terminfo vs. -terminfo Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the
      Message 2 of 9 , Jul 1, 2008
        Hi,

        Jürgen Krämer wrote:
        >
        > 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.
        >>
        >> The entire environment is otherwise identical. Both versions are build
        >> as HUGE versions:
        >>
        >> :version
        >> VIM - Vi IMproved 7.1 (2007 May 12, compiled Nov 21 2007 17:43:28)
        >> Compiled by corinna@coffee
        >> Huge version without GUI. Features included (+) or not (-):
        >> +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
        >> -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
        >> +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
        >> +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
        >> +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
        >> +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
        >> +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
        >> -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
        >> -netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
        >> -python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
        >> -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
        >> -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
        >> +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
        >> +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
        >> -xterm_clipboard -xterm_save
        >> system vimrc file: "$VIM/vimrc"
        >> user vimrc file: "$HOME/.vimrc"
        >> user exrc file: "$HOME/.exrc"
        >> fall-back for $VIM: "/usr/share/vim"
        >> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
        >> 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)
        >> Compiled by corinna@cathi
        >> Huge version without GUI. Features included (+) or not (-):
        >> +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
        >> -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
        >> +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
        >> +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
        >> +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
        >> +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
        >> +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
        >> -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
        >> +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript
        >> +printer +profile -python +quickfix +reltime +rightleft -ruby +scrollbind
        >> +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
        >> +tag_old_static -tag_any_white -tcl -terminfo +termresponse +textobjects +title
        >> -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
        >> +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
        >> -xterm_clipboard -xterm_save
        >> system vimrc file: "$VIM/vimrc"
        >> user vimrc file: "$HOME/.vimrc"
        >> user exrc file: "$HOME/.exrc"
        >> fall-back for $VIM: "/usr/share/vim"
        >> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
        >> Linking:
        >> gcc -L/usr/local/lib -o vim.exe -lm -ltermcap -liconv -lintl
        >>
        >>
        >> What could be the reason?
        >
        > +viminfo
        >
        > vs.
        >
        > -viminfo

        Sorry, I wanted to write

        +terminfo

        vs.

        -terminfo

        Regards,
        Jürgen

        --
        Sometimes I think the surest sign that intelligent life exists elsewhere
        in the universe is that none of it has tried to contact us. (Calvin)

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • 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 3 of 9 , Jul 1, 2008
          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 4 of 9 , Jul 1, 2008
            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 5 of 9 , Jul 1, 2008
              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 6 of 9 , Jul 1, 2008
                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 7 of 9 , Jul 1, 2008
                  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 8 of 9 , Jul 1, 2008
                    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.