Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making tabulation look different than just whitespace

Tags:

python

vim

How to make tabulation look different than whitespace in vim (highlighted for example).

That would be useful for code in Python.

like image 208
Alex Bolotov Avatar asked Jul 28 '09 07:07

Alex Bolotov


1 Answers

I use something like this:

set list listchars=tab:»·,trail:·,precedes:…,extends:…,nbsp:‗

Requires Vim7 and I'm not sure how well this is going to show up in a browser, because it uses some funky Unicode characters. It's good to use some oddball characters so that you can distinguish a tab from something you may have typed yourself.

In addition to showing tabs, showing spaces at the end of lines is useful so you know to remove them (they are annoying).

like image 76
Brian Carper Avatar answered Nov 02 '22 23:11

Brian Carper