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

Red Tabs

Expand Messages
  • Brewtal100
    Hi Every body I m new here. This is my first post. It s a question Could someone please suggest why whenever I press the tab key to indent, the whitespace is
    Message 1 of 5 , Mar 1, 2007
    • 0 Attachment
      Hi Every body

      I'm new here. This is my first post. It's a question
      Could someone please suggest why whenever I press the tab key to indent, the
      whitespace is coloured red?
      How can I get rid of this?

      Thanks
      --
      View this message in context: http://www.nabble.com/Red-Tabs-tf3327604.html#a9251850
      Sent from the Vim - General mailing list archive at Nabble.com.
    • Tim Chase
      ... Welcome to the list :) ... There are a couple possibilities: 1) you re editing a file whose syntax-highlighting definition prescribes highlighting
      Message 2 of 5 , Mar 1, 2007
      • 0 Attachment
        > I'm new here. This is my first post. It's a question

        Welcome to the list :)

        > Could someone please suggest why whenever I press the tab key
        > to indent, the whitespace is coloured red? How can I get rid
        > of this?

        There are a couple possibilities:

        1) you're editing a file whose syntax-highlighting definition
        prescribes highlighting whitespace

        2) you've got search-highlighting triggered (usually by (a)
        having it enabled and (b) searching for a tab)

        3) you've got a syntax-match specified.


        To solve #2, you can

        1) search for something different
        2) temporarily disable search highlightin (":noh")
        3) turn it off all-together (":set nohls")

        To solve #3, you can

        :match none

        Solving #1 is a little trickier, as it depends on what your
        current syntax/file-type is:

        :set ft?

        By knowing the filetype, one can track down how the mapping to a
        color is getting created, and how to override that color.


        If #2 and #3 don't solve the problem, the ":set ft?" results will
        help track down what's going on.

        HTH,

        -tim
      • Albie Janse van Rensburg
        ... Welcome! Have you tried changing your colorscheme, and seeing whether the problem persists? You might also have a search that highlights whitespace at the
        Message 3 of 5 , Mar 1, 2007
        • 0 Attachment
          Brewtal100 wrote:
          > Hi Every body
          >
          > I'm new here. This is my first post. It's a question
          > Could someone please suggest why whenever I press the tab key to indent, the
          > whitespace is coloured red?
          > How can I get rid of this?
          >
          > Thanks
          >
          Welcome!

          Have you tried changing your colorscheme, and seeing whether the problem
          persists? You might also have a search that highlights whitespace at
          the end of line, or some other highlighting set.

          --
          Albie Janse van Rensburg (neonpill)

          Registered Linux User 438873 | <http://counter.li.org>

          "and composed by a woman's three best comforters, - kind words, a
          baby,find even your light yoke heavy."
        • Brewtal100
          Thanks very much for your help I ve tried to fix it as if it was 2) or 3) but it hasn t worked I m writing a piece of fortran90 code (.f90 extension) If that
          Message 4 of 5 , Mar 1, 2007
          • 0 Attachment
            Thanks very much for your help

            I've tried to fix it as if it was 2) or 3) but it hasn't worked

            I'm writing a piece of fortran90 code (.f90 extension) If that helps
            I just started a fresh file and it highlights the first character on each
            line with red (change character to white) and makes all the white space
            before it red aswell. It also highlights the 6th "space" of every line
            orange.

            What's happening?
            I don't remember it doing this before

            > Could someone please suggest why whenever I press the tab key
            > to indent, the whitespace is coloured red? How can I get rid
            > of this?

            There are a couple possibilities:

            1) you're editing a file whose syntax-highlighting definition
            prescribes highlighting whitespace

            2) you've got search-highlighting triggered (usually by (a)
            having it enabled and (b) searching for a tab)

            3) you've got a syntax-match specified.


            To solve #2, you can

            1) search for something different
            2) temporarily disable search highlightin (":noh")
            3) turn it off all-together (":set nohls")

            To solve #3, you can

            :match none

            Solving #1 is a little trickier, as it depends on what your
            current syntax/file-type is:

            :set ft?

            By knowing the filetype, one can track down how the mapping to a
            color is getting created, and how to override that color.


            If #2 and #3 don't solve the problem, the ":set ft?" results will
            help track down what's going on.

            HTH,

            -tim







            --
            View this message in context: http://www.nabble.com/Red-Tabs-tf3327604.html#a9257776
            Sent from the Vim - General mailing list archive at Nabble.com.
          • Tim Chase
            ... Thumbing through the $VIMRUNTIME/syntax/fortran.vim syntax definition, it looks like there are some bits in there for performing column-oriented coloring.
            Message 5 of 5 , Mar 1, 2007
            • 0 Attachment
              > I've tried to fix it as if it was 2) or 3) but it hasn't
              > worked
              >
              > I'm writing a piece of fortran90 code (.f90 extension) If
              > that helps I just started a fresh file and it highlights
              > the first character on each line with red (change
              > character to white) and makes all the white space before
              > it red aswell. It also highlights the 6th "space" of every
              > line orange.
              >
              > What's happening?
              > I don't remember it doing this before

              Thumbing through the $VIMRUNTIME/syntax/fortran.vim syntax
              definition, it looks like there are some bits in there for
              performing column-oriented coloring.

              I suspect it's the

              syn match fortranLabelError "^.\{-,4}[^0-9 ]"
              contains=fortranTab

              that's causing the trouble. Fortunately, it looks like you
              can add a line to your vimrc something like

              let fortran_have_tabs=1

              which may solve matters.

              You can read more than any sane person should want at

              :help fortran

              particularly the section about "Tabs in fortran files".

              Hope this helps,

              -tim
              (successfully avoiding Fortran and Cobol for over 10 years!)
            Your message has been successfully submitted and would be delivered to recipients shortly.