In both Eclipse and Notepad++, I have my text editors configured so a space has a semi-transparent dot in the center, which makes it easy to count whitespace. I prefer to use spaces instead of tabs in my text editing, and this feature is crucial when working with a whitespace-sensitive language like Python.
I have attached a screenshot with some dummy code in case my wording wasn't clear.
At any rate, is there any way to come close to this functionality in Vim (or GVim)? I suppose there is highlighting but that does seem a bit subpar. There's also good old fashioned math by looking at the column number. What are my other options?
Thes lines in your vimrc should give you an approximation but you won't get dots for normal or leading space: only trailing spaces. That's a Vim limitation.
set list
set listchars=
set listchars+=tab:»\
set listchars+=extends:›
set listchars+=precedes:‹
set listchars+=nbsp:·
set listchars+=trail:·
See :help 'list'
and :help 'listchars
.
I agree with romainl's answer, but would like to add a mention of the indent guides, which can colour indentation based on your current tab size settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With