0

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?

3
  • Have you looked at :help termcap-cursor-shape?
    – Heptite
    Jun 10, 2015 at 18:07
  • Is it possible to send the escape sequence mentioned via a command? Sorry not much of vim-settings expert, i use vim for fast movement/editing mostly. Also, this should be noted for other readers, if this works, it would only be for cursor and would not fix the mouse pointer issue I mention in the question
    – 0fnt
    Jun 10, 2015 at 19:04
  • Oops, my mistake. I don't think console Vim can change the mouse shape. What you're seeing is almost certainly a feature of the terminals themselves.
    – Heptite
    Jun 10, 2015 at 19:42

1 Answer 1

0

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.

2
  • As the above comments suggest, the term_cursor_shape isn't for the mouse cursor, but the terminal cursor.
    – Heptite
    Jun 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .