The variable cursor-type
controls how the appearance of the cursor, defaulting to t
, which uses the cursor specified for the frame (see the docstring for options). If you'd like the cursor to default to a block, you can (setq cursor-type 'box)
.
However, evil
provides a number of different cursors for the different states, which you can adjust to give you a visual reminder of what state you're in when you're typing:
evil-normal-state-cursor
evil-insert-state-cursor
evil-visual-state-cursor
evil-motion-state-cursor
evil-replace-state-cursor
evil-operator-state-cursor
The docstring states that each of these:
May be a cursor type as per cursor-type
, a color string as passed
to set-cursor-color
, a zero-argument function for changing the
cursor, or a list of the above.
So, for example, if you wanted a yellow bar 5 pixels wide in insert state and a purple-filled box in normal state, you could do the following:
(setq evil-insert-state-cursor '((bar . 5) "yellow")
evil-normal-state-cursor '(box "purple"))
See the docstring for cursor-type
for your options in adjusting the cursor.