When I use vim with gnome-terminal or yakuake, and I have mouse on ( set mouse+=a
), then I see an arrow as mouse pointer, and when I have mouse off, then the "insert" sign as mouse pointer.
However, in xterm (and urxvt), I see only mouse pointer. How to ensure that I see the distinction in xterm as well? Or if not using mouse, then some other clearly visible distinction?
1 Answer
vim does have a feature for changing the mouse appearance (see term_cursor_shape) but it depends upon names normally not found in a termcap description: SI
and EI
(vim uses termcap names, even though termcap is rare compared to terminfo). The usual names are vi
(invisible), ve
(normal) and vs
(very visible).
If you happen to know a control sequence that works, you can use it in the corresponding t_SI
and t_EI
settings within vim.
Here are a few links to help:
Outside of the documented vi/ve/vs, you are unlikely to find the same control sequences used for xterm versus urxvt. xterm implements (see XTerm Control Sequences) the DECSCUSR
control which provides combinations of blinking/nonblinking and block/underline cursors.
-
As the above comments suggest, the term_cursor_shape isn't for the mouse cursor, but the terminal cursor.– HeptiteJun 11, 2015 at 0:38
-
The OP wants to see a distinct cursor in insert-mode. vim documents a way to do that. Jun 11, 2015 at 1:03
:help termcap-cursor-shape
?