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

possible syntax coloring bug

Expand Messages
  • Ulf Jaenicke-Roessler
    Hi, I m using vim-5.7 on AIX and vim-5.6.070 on Debian GNU/Linux. Both show the same behaviour with regard to this problem: if the background variable is set
    Message 1 of 6 , Jul 28, 2000
      Hi,

      I'm using vim-5.7 on AIX and vim-5.6.070 on Debian GNU/Linux. Both show
      the same behaviour with regard to this problem: if the background variable
      is set to dark (e.g. via .vimrc) syntax highlighting does not work
      correctly.
      FWIW, both sessions are run via telnet connection.
      If I set background=light the highlighting works fine.

      HTH,

      Ulf
    • Ulf Jaenicke-Roessler
      ... Some more details. I tried this on the Linux console and via telnet to AIX from it. This works. The problems I described arise, when I telnet from a Win98
      Message 2 of 6 , Jul 28, 2000
        > I'm using vim-5.7 on AIX and vim-5.6.070 on Debian GNU/Linux. Both show
        > the same behaviour with regard to this problem: if the background variable
        > is set to dark (e.g. via .vimrc) syntax highlighting does not work
        > correctly.
        > FWIW, both sessions are run via telnet connection.
        > If I set background=light the highlighting works fine.

        Some more details. I tried this on the Linux console and via telnet to AIX
        from it. This works. The problems I described arise, when I telnet from a
        Win98 box with TeraTerm (telnet client in Windows) to either system (Linux or AIX).

        Ulf
      • Bram Moolenaar
        ... You will have to give more information. How can it be reproduced? What do you see? Which syntax are you using? -- A day without sunshine is like, well,
        Message 3 of 6 , Jul 28, 2000
          Ulf Jaenicke-Roessler wrote:

          > I'm using vim-5.7 on AIX and vim-5.6.070 on Debian GNU/Linux. Both show
          > the same behaviour with regard to this problem: if the background variable
          > is set to dark (e.g. via .vimrc) syntax highlighting does not work
          > correctly.
          > FWIW, both sessions are run via telnet connection.
          > If I set background=light the highlighting works fine.

          > Some more details. I tried this on the Linux console and via telnet to AIX
          > from it. This works. The problems I described arise, when I telnet from a
          > Win98 box with TeraTerm (telnet client in Windows) to either system (Linux
          > or AIX).

          You will have to give more information. How can it be reproduced? What do
          you see? Which syntax are you using?

          --
          A day without sunshine is like, well, night.

          /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
          \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
        • Ulf Jaenicke-Roessler
          ... I m terribly sorry to have this information not included so far. I thought, this would be a, somehow, more general problem. Until recently I used VIM5.0
          Message 4 of 6 , Jul 31, 2000
            Bram Moolenaar wrote:

            > Ulf Jaenicke-Roessler wrote:
            >
            > > I'm using vim-5.7 on AIX and vim-5.6.070 on Debian GNU/Linux. Both show
            > > the same behaviour with regard to this problem: if the background variable
            > > is set to dark (e.g. via .vimrc) syntax highlighting does not work
            > > correctly.
            > > FWIW, both sessions are run via telnet connection.
            > > If I set background=light the highlighting works fine.
            >
            > > Some more details. I tried this on the Linux console and via telnet to AIX
            > > from it. This works. The problems I described arise, when I telnet from a
            > > Win98 box with TeraTerm (telnet client in Windows) to either system (Linux
            > > or AIX).
            >
            > You will have to give more information. How can it be reproduced? What do
            > you see? Which syntax are you using?

            I'm terribly sorry to have this information not included so far. I thought,
            this would be a, somehow, more "general" problem.

            Until recently I used VIM5.0 quite the same way I wanted to use VIM5.7 now:
            On Windows98, telnetting with TeraTerm Pro to an IBM workstation with AIX
            3.x. With VIM5.0 I just needed to set t_Co, t_AB and t_AF and got the
            colours. In order to use a similar setup as in X (where I have a light
            background and need set background=light) I inserted set background=dark
            (of course, light is the default, but I use dark colors in TeraTerm: light gray
            chars on black). This made no difference with 5.0, but with 5.7 I did not get
            the usual colors. Instead, I had bold blue characters on white background,
            some (still light gray) chars were underlined, other (light gray) chars
            were not changed at all (staying on black background).

            The reason turned out to be the set background line. If I omit this line
            or set it to light in .vimrc (or :set background=light, :syn off, :syn on
            in VIM) the highlighting works as before with VIM5.0 (even with the same
            colors, regardless of the background variable).

            I don't have any X support compiled in. And unfortunately I don't have the
            VIM5.0 binary available for tests- it was overwritten during installation
            of VIM5.7.

            I believe the kind of syntax was not important, I tried it with .c and
            .vimrc

            Please feel free to ask for more information.

            Greetings,

            Ulf
          • Bram Moolenaar
            ... The bold effect can be explained. Many terminals use a lighter color when the bold attribute is set (since they can t show bold characters). I don t
            Message 5 of 6 , Jul 31, 2000
              Ulf Jaenicke-Roessler wrote:

              > Until recently I used VIM5.0 quite the same way I wanted to use VIM5.7 now:
              > On Windows98, telnetting with TeraTerm Pro to an IBM workstation with AIX
              > 3.x. With VIM5.0 I just needed to set t_Co, t_AB and t_AF and got the
              > colours. In order to use a similar setup as in X (where I have a light
              > background and need set background=light) I inserted set background=dark
              > (of course, light is the default, but I use dark colors in TeraTerm: light
              > gray chars on black). This made no difference with 5.0, but with 5.7 I did
              > not get the usual colors. Instead, I had bold blue characters on white
              > background, some (still light gray) chars were underlined, other (light
              > gray) chars were not changed at all (staying on black background).

              The bold effect can be explained. Many terminals use a lighter color when the
              bold attribute is set (since they can't show bold characters).

              I don't understand the underlining. This would only be used for black&white
              terminals. Perhaps the order in which 't_Co' and 'background' are set
              matters? And ":syntax on" should be last.

              > The reason turned out to be the set background line. If I omit this line
              > or set it to light in .vimrc (or :set background=light, :syn off, :syn on
              > in VIM) the highlighting works as before with VIM5.0 (even with the same
              > colors, regardless of the background variable).

              You can check the colors used with ":highlight". Or use the script
              $VIMRUNTIME/syntax/colortest.vim and hitest.vim

              --
              hundred-and-one symptoms of being an internet addict:
              40. You tell the cab driver you live at
              http://123.elm.street/house/bluetrim.html
              41. You actually try that 123.elm.street address.

              /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
              \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
            • Ulf Jaenicke-Roessler
              Hi, ... IIRC, it did not help to switch the bold attribute in the terminal emulation. And AFAIK, the bold blue on white was only enabled char-wise for all
              Message 6 of 6 , Aug 2, 2000
                Hi,

                Bram Moolenaar wrote:

                > Ulf Jaenicke-Roessler wrote:
                >
                > > Until recently I used VIM5.0 quite the same way I wanted to use VIM5.7 now:
                > > On Windows98, telnetting with TeraTerm Pro to an IBM workstation with AIX
                > > 3.x. With VIM5.0 I just needed to set t_Co, t_AB and t_AF and got the
                > > colours. In order to use a similar setup as in X (where I have a light
                > > background and need set background=light) I inserted set background=dark
                > > (of course, light is the default, but I use dark colors in TeraTerm: light
                > > gray chars on black). This made no difference with 5.0, but with 5.7 I did
                > > not get the usual colors. Instead, I had bold blue characters on white
                > > background, some (still light gray) chars were underlined, other (light
                > > gray) chars were not changed at all (staying on black background).
                >
                > The bold effect can be explained. Many terminals use a lighter color when the
                > bold attribute is set (since they can't show bold characters).

                IIRC, it did not help to switch the bold attribute in the terminal
                emulation. And AFAIK, the "bold blue on white" was only enabled char-wise
                for all chars that would have another color. The plain light gray chars on
                black would never change (according to my actual color settings). It
                includes, for example, all comments.

                The underlining happened (only) in the very last line of the screen (the
                status area), where VIM prints "File changed and not yet written" and
                thing like that. *This* could be found in other terminal emulations as
                well (also with set background=light), even color ones (e.g. a `tektronix'
                terminal).

                While I'm describing the effect on the `tektronix' terminal, I tried to
                find differences with set background here. I have a white background and
                VIM5.7 shows with background=light cyan, blue and black chars on white
                for this mail, depending on the citation depth. If I use background=dark,
                all non-black colors get bold cyan, black chars stay black. This is
                probably the "bold" effect you mentioned.
                However, VIM5.7 handles this terminal very much better than VIM5.0 did.
                Syntax highlighting was very instable and :syn off did not work as expected
                with the older version (it left me with all chars cyan - nearly unreadable
                on white). So - good work! :)

                > I don't understand the underlining. This would only be used for black&white
                > terminals. Perhaps the order in which 't_Co' and 'background' are set
                > matters?

                Well, this is something I'll try as soon as I'll be back from my official
                journey and will have access to Win98/Teraterm.

                > And ":syntax on" should be last.

                Yes, this is the last command.

                > You can check the colors used with ":highlight". Or use the script
                > $VIMRUNTIME/syntax/colortest.vim and hitest.vim

                I'll try that too, as soon as I'll be back. Colors normally work fine
                when I use ESC AnsiSequences or ls --color.

                And remember, I did not change anything in my configuration (neither for
                the terminal nor in .vimrc) between VIM5.0 and VIM5.7.


                On the other hand this is most probably closely related to the terminal
                emulation TeraTerm or `tektronix' (see above), since the problems do
                not occur when using Linux telnet for example. However, I want to
                stick to TeraTerm, since it is a free telnet program and I'm used to
                it. Unfortunately, the author does not respond on inquiries. I had another
                problem (which is not VIM related, cause it occurs with other editors like
                joe and if telnetting to other OS's too), when I paste a couple of lines
                (more than 3 or 4 usually) it keeps pasting parts of this text for ever
                (until I kill it).

                Best regards,

                Ulf
              Your message has been successfully submitted and would be delivered to recipients shortly.