1

when try to work with vim I installed several plugins and started trying to write some java code and during coding found such an annoying space highlights dont know what is that and how to turn it off

enter image description here

Oleg Maksymuk
  • 441
  • 4
  • 10

1 Answers1

3

I don't know which plugins you installed, but I'm sure that - although annoying to you - these highlighted areas are pretty useful. (1) You seem to be mixing spaces and tabs for indentation and (2) you have trailing whitespace on some lines. These "problems" are highlighted in some warning color.

First of all it's a very good idea to apply a consistent coding style. This includes using either tabs or spaces for indentation. Just place the cursor on the yellow area and compare the whitespace with those lines without yellow background (move the cursor left or right). There is plenty of documentation about indentation, including the relevant vim settings (e. g. here or here).

The second thing is that apparently the syntax highlighting plugin "complains" about whitespace at the end of a line. You should also avoid that. You could remove trailing whitespace automatically when saving the buffer (see here).

steffen
  • 16,138
  • 4
  • 42
  • 81