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 in Insert mode and start typing code, which results in all sorts of crazy things happening. It would be helpful if there was some sort of visual indication on the cursor.
A popular approach to indicate switching to and from Insert mode is
toggling the
cursorlineoption, which is responsible for whetherthe current screen line is highlighted (see
:help cursorline):or, alternatively:
Modify the
CursorLinehighlighting group to change the stylingof the cursor line to your liking (see
:help :highlightand:help highlight-groups).This approach assumes, of course, that you do not use the cursor
line highlighting in Normal mode.