-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add option to change cursor shape on mode change #323
Comments
This is a terminal limitation: it only has one cursor so we can only change shape of the primary selection. I had that initially but removed it for the sake of consistency. |
It's a very easy way to be aware of the mode you're in, and we could mention in the docs that only the primary selection's cursor will change. Also a question: will the primary cursor always be visible in the screen, even with multiple selections ? |
I agree with @sudormrfbin. This is actually a very useful feature that I also miss. However, perhaps we might think of another way to help the user quickly understand in which mode he currently is without looking on the bottom left or trying to type something. Even changing the color of the mode's indicator will enable the user to use his peripheral vision and understand the mode faster. |
I tried this, currently it's broken. Although it did change the style, it breaks IME input, try typing in some japanese text then you know what I am saying, but it works fine for ascii. Maybe the IME thing could be another bug that we need to solve. |
I tested again, bar cursor seemed to work with IME. But the color is a bit weird, maybe need to have different theme. But not working well with multiple cursors, only main cursor is bar. |
I'm going to take a stab at this and see how it turns out. |
@sudormrfbin I did test this locally and works. But I think you might want to change the theming along with this, it looks ugly if you only change the cursor shape based on mode. I think we should have sort of a new mode for replace so we can use the One more issue I have when I tested it out is only the main cursor will change shape but other cursors is the same block shape, which looks inconsistent and made it ugly. Not sure how to fix it. |
@pickfire Yeah the theming looks weird with it so I made some changes (in the rendering code itself):
We can't do anything here since it's a limitation of the terminal itself, so the best thing we can try is to change the primary cursor to a bar and make the others look like a block cursor. |
I wonder if there's sort of hack we can do to display a bar. Maybe we just replace the last character with a bar for all other cursors? |
Replacing seems a bit too drastic and hacky, and there were some discussions (that were abandoned) in kovidgoyal/kitty#720 and mawww/kakoune#2194 regarding an xterm extension for supporting multiple cursors. |
i wonder @Kethku would be interested in this. neovide cursors are cool, then we have multiple animated cursors, how nice. |
This was discussed earlier in this thread, it's a terminal limitation sadly. I had the shape changes built in but later removed them. |
Really in nvim the three shapes of cursor to tell which mode is the current one without having to look at the status bar (and find the cursor position back, which is uneasy on big terminals) are very ergonomic. It's a big loss. |
Fixes helix-editor#323. Due to terminal limitations we can only change the shape of the primary cursor.
Fixes helix-editor#323. Due to terminal limitations we can only change the shape of the primary cursor.
#1154 uses the real terminal cursor as the primary cursor and draws the other cursors, so that problem would be solved. |
An option similar to neovim's
'guicursor'
is something I miss, which can for example change the cursor to bar for insert and back to block on normal and selection mode.The text was updated successfully, but these errors were encountered: