kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
23.84k stars 961 forks source link

Dynamically change cursor shape based on Vim mode #5083

Closed AniAggarwal closed 2 years ago

AniAggarwal commented 2 years ago

I use VIM-like keybinds in terminal, set via my .inputrc:

# Use Vim keybinds instead of default Emacs
set editing-mode vi
# Change cursor shape depending on current mode 
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2

This works fine with Gnome Terminal, but with kitty it doesn't change the cursor shape. I can make it work by disabling shell integration entirely, but using the no_cursor flag doesn't work.

I would love to still be able to have shell integration while being able to modify the cursor shape.

kovidgoyal commented 2 years ago

Use zsh or fish, this is builtin in the shell integration. Readline is a horrible library, I am not surprised it breaks with shell integration. I know of no way to make it work with readline and bash (which is by far the worst of the three shells currently supported by shell integration). If you do patches are most welcome.

AniAggarwal commented 2 years ago

Alright, I'll see if I can dig around and find a patch. Not my area of expertise though, so don't expect anything.