Vim - Tracking Accurate Spaces

In Eclipse and Notepad ++, I have text editors configured, so there is a translucent dot in the center, which makes it easy to count spaces. I prefer to use spaces instead of tabs in my text editing, and this feature is crucial when working with a space-sensitive language like Python.

I attached a screenshot with some kind of dummy code if my wording was not clear.

Anyway, is there a way to get closer to this functionality in Vim (or GVim)? I suppose there is a highlight , but that seems a bit sub. There's also good old-fashioned math, looking at the column number. What are my other options?

whitespace example

+4
source share
2 answers

The lines in your vimrc should give you an approximate value, but you won’t get points for regular or leading space: only spaces. This is a limitation of Vim.

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 .

+6
source

I agree with the romainl answer, but would like to add a mention of indents that can color indents based on your current tab setting size.

+3
source

All Articles