Vim Motions supports per-mode cursor shapes, letting you visually distinguish between Normal, Insert, Visual, Replace, and Operator-pending modes.

Requires bundled fork mode

Cursor shapes only work when Obsidian’s built-in Vim mode is disabled (Settings → Editor → Vim key bindings → off). With built-in Vim enabled, Obsidian renders its own block cursor and the plugin has no control over its shape.

Available shapes

ShapeDescription
blockSolid block cursor (covers the character)
barThin vertical line before the character
underlineThin horizontal line under the character
hollowOutlined block cursor (character visible inside)

Defaults

ModeDefault shape
Normalblock
Insertbar
Visualblock
Replaceunderline
Operator-pendingunderline

Configuration

Settings UI

Settings → Vim Motions → Cursor shapes — select a shape for each mode from the dropdown.

Lua

vim.opt.guicursor = "n:block,i:bar,v:block,r:underline,o:underline"

Mode codes: n (normal), i (insert), v (visual), r (replace), o (operator-pending), a (all).
Shapes: block, bar, underline, hollow.

Vimrc

Use the guicursor option with a comma-separated list of mode:shape pairs:

set guicursor=n:block,i:bar,v:block,r:underline,o:underline

Mode codes: n (normal), i (insert), v (visual), r (replace), o (operator-pending).

Examples

vim.opt.guicursor = "n:hollow,i:bar,v:block,r:underline,o:underline"
" Or via vimrc:
set guicursor=n:hollow,i:bar,v:block,r:underline,o:underline

Cursor colors

Cursor colors are derived from Obsidian’s CSS variable --interactive-accent. Visual line highlights use --text-selection. These adapt automatically to your theme.

To customize cursor colors further, override the CSS variables in a CSS snippet:

.cm-fat-cursor {
    caret-color: red;
}