Fixing my cursor behavior?

Here’s the behavior I observe in Vim:

  1. My cursor blinks when the the terminal is focused.
  2. My cursor turns into a hollow box when the terminal isn’t focused.
  3. When my terminal is focused but my tmux pane is not focused, then the cursor disappears.

In kak, my cursor is always a solid box. Is there a way to change the behavior to match what I see in Vim? (I mostly care about 2 because 1 is optional and I can figure out how to do 3 with hooks.) I’m using gnome-terminal if that makes a difference.

Edit: I should also mention that this seems to be the default shell behavior as well.

Short answer, no.

Long answer:

  • the VT220 model includes the concept of a “cursor”, which has a specific location on-screen
  • terminal emulators mark the position of the cursor in various ways which are impossible to replicate with plain-text output, so that the user can see where the cursor is supposed to be no matter what other stuff is visible on-screen
  • Kakoune is built around multiple selections, so it can’t use the (single) terminal hardware cursor
  • Because it cannot use the hardware cursor, Kakoune selections can never exactly impersonate it
1 Like