-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work with kitty on a xterm protocol extension to use terminal's *native* multiple cursors (to enable different cursor shapes and blinking) #2194
Comments
i am still using a patched kak to support this. if there is a interest i can work on a new pull request. |
Awesome, I'm interested, is there a way for me to try? Could you also describe a bit your patch, does it make all cursors change form or only primary, and does it draw cursors as Unicode characters or exposes the ncurses cursor (which seems to be a no-go from the quote I posted in the first message)? Having all cursors change form would be ideal of course 🙂 |
Unicode cursors won't help, as they'd overwrite the existing character in their cell. That there is always a selection of at least one char has little to do with kakoune knowing which mode it's in. Even in insert mode there is a selection, and the cursor is part of the selection. There are in my mind two inconsistencies that occur during insert mode:
I suppose this is kakoune's intended behavior: selections always include cursors, and text is always inserted before cursors. I'm not, however, aware of any pragmatic benefits. If selections were to be left unmodified when prepending and appending, the problem is then communicating during insert mode where text will be inserted. One solution is to render |
I've started a discussion in kitty terminal emulator about extending xterm protocol for native terminal support for multiple cursors. The author is not opposed to the idea, and actually is looking for collaboration with kakoune developers in order to properly design this feature that can actually meet the needs of the editor. Everyone who is interested in joining the discussion, please do! |
Yeah, someone on IRC explained this to me already... I was under the impression that we can draw one Unicode character on top of another (so that we can draw a cursor char and then a letter on top of it in reversed color), but it's not how this works, we can only put one character in a cell and modify its background and foreground color (so currently the "cursor" is just a white background color). That's why I created kovidgoyal/kitty#720, I think this should be solved on the terminal level, and not by doing magic with background colors. The native terminal cursor has many capabilities that we can never replicate ourselves, such as cursor shape or blinking. I really hope we get the discussion in kovidgoyal/kitty#720 rolling and implement this. Kitty's protocol extensions have already proven to be successful, e.g. image protocol is being integrated in ranger so that it can draw pictures without relying on w3m hacks.
Exactly my point, I think we agree on this. The fact that kakoune always has some selection shouldn't stop us from having different cursor shapes when a user is in insert or replace more, the cursor shape is there to help understand what a next keypress will do to the buffer, just like the indicator in modeline.
I think this deserves a ticket of its own, here I have a very specific wish to have kakoune support native multiple cursors with all of it's features, such as shapes and blinking. |
Closing for now as sadly no terminal is currently wishing to implement native multiple cursors. |
I want to see a beam cursor in insert mode and an underline cursor in replace mode, and a hollow block cursor when terminal is currently unfocused.
Kitty's author is open to work on a new xterm protocol extension to implement native multiple cursors support in terminals. He is looking for collaboration with kakoune developers in order to design the new protocol that can truly fulfill the needs of the editor.
Please join the discussion here: kovidgoyal/kitty#720
Old ticket description, no longer relevant
First of all, I've seen #1385, the argument "there is always a selection, so cursor should always be block" is simply wrong — kakoune knows when I'm in normal, insert and replace mode, it should just render different cursor shapes at corresponding points of time.
I've also seen #1393, and an argument:
Sure, let kakoune control the cursor, but teach it to use different shapes anyway. Do you need Unicode characters to use as cursors? Here you go:
▎
and▁
. Since current cursor is probably█
, we can use this one for hollow cursor (when kak is unfocused):░
.P.S. If I could get a "hollow block" cursor when the terminal is unfocused, I would be even happier, but I the beam and underline cursors should be the priority.
The text was updated successfully, but these errors were encountered: