I would like to know how to change, if possible, the cursor in Vim (in color, shape, etc.) depending on what mode you are in.
I am constantly forgetting that I am not
If you are using a modern version of nvim and you wanted to achieve this, you can avoid some of these fancy workarounds listed above.
The below settings will switch from block cursor in normal mode, to underline cursor in replace to line cursor in insert.
# ~/.tmux.conf
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q',w
" ~/.vimrc
" Sets cursor styles
" Block in normal, line in insert, underline in replace
set guicursor=n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20
I managed to get this working with the following settings pulled from these two sources.
tui-cursor-shape
guicursor