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




Reply via email to