I'd like terminal Emacs to observe the current value of cursor-style
when the current terminal emulator supports commands to change the cursor.
For example: MinTTY
is the default terminal emulator for Cygwin. According to this page, it supports changing cursor styles using the following escape sequences:
\e[1 q
for a block cursor.\e[5 q
for a bar cursor.
Other terminal emulators that support these escapes include the VTE-based emulators (gnome-terminal
and friends) and xterm
and its derivatives.
Currently, hacks exist for evil-mode
that attempt to simulate this support. Unfortunately, these break when the terminal doesn't support said escapes. Here's a question to see if that's fixable.
As far as I can tell, Emacs doesn't support changing the cursor natively. Is there any way we can support it without relying on a package like evil
?
cursor-type
in the current buffer? AFAIK Emacs doesn't support changing the cursor type according to the current buffer on text terminals, but you can setvisible-cursor
to switch between two cursors globally (I don't know whether that toggles between block and bar, but that could be changed in terminfo).evil-terminal-cursor-changer
Unfortunately, said package is broken, but that's beyond the scope of this question.