Terminal & CLI

How do I change cursor shape per Vim mode?

→  Set t_SI, t_SR, and t_EI variables in your .vimrc with the appropriate escape sequences for insert, replace, and normal modes.

Answer

How do I change cursor shape per Vim mode?

Set t_SI, t_SR, and t_EI variables in your .vimrc with the appropriate escape sequences for insert, replace, and normal modes.

Example: 'let &t_SI = "\e[5 q"' sets a blinking bar in insert mode. t_EI controls the cursor when leaving insert mode. These settings work in terminals that support DECSCUSR.

Q

A

← All FAQs