Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Vim was showing some whitespace with commas and periods on a red background which I didn't want. After some googling I was able to get rid of the commas and periods by removing list and listchar lines from .vimrc, I was also hoping this would remove the red backgrounds it was putting in these places, but all it did was change that to white (see image).

enter image description here

Is it possible to completely remove the whitespace background indicators in Vim? My .vimrc settings can be seen here and the plugins I'm using are listed here

share|improve this question
What color scheme do you use? – Flint Nov 18 '12 at 22:42
@Flint my .vimrc is set to color solarized but I'm open to switching schemes if the above is a "feature" of solarized – Exupery Nov 19 '12 at 0:16
I grabbed solarized theme from vim site and I don't have that white background problem when I tested it. Are you using the same solarized downloaded from that site too? – Flint Nov 19 '12 at 3:35
@Flint I just tried replacing my copy of solarized with a fresh one from the site and it had no effect. Also tried a couple other schemes and the whitespace indicators remained present. I've added my .vimrc above if that helps. – Exupery Nov 19 '12 at 5:14
Did you test an other colorscheme? To change it, type e.g. :colorscheme default. If this doesn't have an effect this is caused by a plugin. Search for hi or highlight expressions in your (ft)plugin files or extend your question with a list of all enabled plugins. – Lasall Nov 22 '12 at 1:14
up vote 2 down vote accepted

Thanks to Lasall's suggestion to check my plugins the behavior turned out to be caused by a plugin named vim-indent-guides - removing that resolved the issue.

share|improve this answer

This will do the trick:%s/^ +// :)

share|improve this answer
If I'm reading that correctly wouldn't that just remove all tabs and whitespaces? I'm not looking to change the formatting, I want the spaces/tabs to remain, just without any visual indication they are there. – Exupery Nov 19 '12 at 0:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.