You can use the conceal function, which is new in 7.3.
Here is a function that does something roughly what the article describes (for spaces, tab counting will instead be a pretty trivial addition):
function! IndentationHeatMap() set conceallevel=1 for i in range(1,9) let indentation = repeat(" ", &sts * i) exe 'syntax match NonText "^' . indentation . '" conceal cchar=' . i endfor endfunction
A solution close to what you are requesting can use conceal to hide all leading spaces with
syntax match NonText "^\s\+" conceal
and then use signs to provide indicators based on custom calculations.
Note: NonText in these syntax commands is an arbitrary selection group.
source share