Background and problem
autocmd InsertEnter * set cul
autocmd InsertLeave * set nocul
However, the default underline makes it hard to see literal underscore characters
- I know I can change the highlighting of
CursorLine, which would make underscores visible again, but this breaks syntax highlighting.
- Another option is to highlight the underscore character itself in Insert mode. However, this seems like overkill, because I don't want every single underscore highlighted. Also, it doesn't work for areas that are syntax highlighted.
syn match underscore "_"
autocmd InsertEnter * hi underscore ctermbg=grey cterm=none ctermfg=black
autocmd InsertLeave * hi clear underscore
I also know that I can change the cursorline to bold, italics, etc., but this is also visual overkill.
An ideal solution would be to make the cursorline underline be a light colour, with the literal underscore a darker black, but it seems that cursorline always inherits
Is there a simple way to still see underscores, while using cursorline?
I'm using regular terminal vim (in Terminator generally), not gvim.