Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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 solid/blink cursor toggle #1936

Closed
peterkos opened this issue Apr 2, 2022 · 13 comments
Closed

Add solid/blink cursor toggle #1936

peterkos opened this issue Apr 2, 2022 · 13 comments
Labels
A-gui Area: Helix gui improvements C-enhancement Category: Improvements

Comments

@peterkos
Copy link

peterkos commented Apr 2, 2022

It'd be great if the cursor could have a solid mode that does not blink.

Sublime Text has a few options("smooth", "phase", "blink", "solid"), but it seems easiest just to do blink and solid.

@peterkos peterkos added the C-enhancement Category: Improvements label Apr 2, 2022
@the-mikedavis
Copy link
Member

I think this is a terminal option. For example, kitty has a cursor_blink_interval option that, when set to 0, disables blinking. Which terminal emulator are you using?

@NNBnh
Copy link
Contributor

NNBnh commented Apr 3, 2022

"blink" and "solid" cursor can be set by using ANSI escape code lkie:

echo -e -n "\x1b[\x30 q" # Blinking block
echo -e -n "\x1b[\x31 q" # Blinking block
echo -e -n "\x1b[\x32 q" # Steady block
echo -e -n "\x1b[\x33 q" # Blinking underline
echo -e -n "\x1b[\x34 q" # Steady underline
echo -e -n "\x1b[\x35 q" # Blinking bar
echo -e -n "\x1b[\x36 q" # Steady bar

But "smooth" and "phase" is impossible due to limitation of the terminal.

Maybe this will be imperment to the GUI forntend.

@kirawi kirawi added the A-gui Area: Helix gui improvements label Apr 3, 2022
@peterkos
Copy link
Author

peterkos commented Apr 9, 2022

I think this is a terminal option. For example, kitty has a cursor_blink_interval option that, when set to 0, disables blinking. Which terminal emulator are you using?

I use iTerm2 (3.4.15). Even with Blinking Cursor disabled it still blinks when resting.
(Also, curiously, the cursor shape of my iTerm setting gets overridden with the block cursor after quitting helix. Might be worth a separate bug report)

CleanShot.2022-04-09.at.17.08.34.mp4

@ChzenChzen
Copy link

I use Kitty(Mac OS) and my caret blinking is on, but when I open helix my caret blinking is off )).

@sudormrfbin
Copy link
Member

Helix draws its own cursors since we need multiple cursors, hiding the terminal cursor.

@ChinmayMoghe
Copy link

Same issue I have faced is there a way to disable the animation ?

@eliasboegel
Copy link

I would like this too. The block cursor for me is indeed solid and non-flashing, but the bar cursor flashes (even when moving the cursor), making it hard to see its position sometimes when moving the cursor around.

@Tubbles
Copy link

Tubbles commented Jan 2, 2023

(Also, curiously, the cursor shape of my iTerm setting gets overridden with the block cursor after quitting helix. Might be worth a separate bug report)

Noticed this as well so created a ticket #5364

@7ombie
Copy link
Contributor

7ombie commented Jun 14, 2023

My Helix cursor never blinks (including at the command line, in the file picker etc - where the terminal cursor's color is reused by Helix). The cursor blinks correctly in zsh, outside of Helix. I'm using iTerm on macOS.

A couple of other people have reported the same issue (@ChzenChzen and @eliasboegel, also on macOS).

@7ombie
Copy link
Contributor

7ombie commented Jun 14, 2023

There are now two bugs and a feature request in this issue.

There is a bug with cursors not blinking, another bug where the cursor is not properly reset when Helix exits, as well as a feature request for new cursor configuration options (re. blinking).

@Alacho2
Copy link

Alacho2 commented Apr 22, 2024

Just trying out Kitty and I came to say that the cursor is not blinking in Helix but blinking just fine in Vim. :)

@JonnieCache
Copy link

Also seeing a non-blinking cursor on ubuntu 24.04 using the builtin terminal. The cursor blinks correctly outside of helix, in the shell and in vim for example.

@hholst80
Copy link

hholst80 commented Dec 29, 2024

There are now two bugs and a feature request in this issue.

There is a bug with cursors not blinking, another bug where the cursor is not properly reset when Helix exits, as well as a feature request for new cursor configuration options (re. blinking).

This is a workaround for restoring blinking (if this is what you have) after closing helix:

  1. rename helix binary to hx.bin or put a executable called hx in your PATH before the actual hx binary. I have installed helix in /usr/local/bin because I made some patching of it.
  2. put this wrapper script in your path. remember to make it executable by setting the execute bit (chmod 755 hx).
#!/bin/sh

hx.bin "$@"           # exec cannot be used because we need to run a cleanup echo after the call
echo -n -e "\e[?12h"  # Enable cursor blinking

Note that Neovim seems to have this exact issue too, so it could be reasonable to handle the fallback in the shell prompt.

@helix-editor helix-editor locked and limited conversation to collaborators Dec 29, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #12363 Dec 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
A-gui Area: Helix gui improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests