There is good snippet for changing cursor color:
if &term =~ \"xterm\\\\|rxvt\"
\" use an orange cursor in insert mode
let &t_SI = \"\\]12
I chose to switch CursorLine
and Normal
in insert mode. First get the values with :hi Normal
and :hi CursorLine
. Then adjust the following lines:
set cursorline
autocmd InsertEnter * highlight Normal ctermbg=7
autocmd InsertEnter * highlight CursorLine ctermbg=15
autocmd InsertLeave * highlight Normal ctermbg=15
autocmd InsertLeave * highlight CursorLine ctermbg=7
For solarized light, this looks like this. I like the "focus" effect.