Highlight spaces before and after the cursor
highlight FooBar guibg = # 80a0ff
au CursorMoved *: match FooBar /\s*\%#.\s*/
This works as normal with gvim. To make it work in vim terminal, change guibg to ctermbg. If you want it also in insert mode, change au CursorMovedto
au CursorMoved, CursorMovedI, InsertEnter
, .
regex \%# . . , .