-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
vi-mode-switching reexecutes the prompt, which is slow #5783
Comments
It works for me - What exactly did you execute? Did you set it in config.fish or elsewhere? |
I've tried both setting manually and in the config. It is not correct of me
to say that the setting is not respected. Setting to 5 seconds makes it
take 5 seconds. But setting to 10 msec and it's still like 400-600 msec. I
do not have this problem in Bash vi mode with `set keyseq-timeout 0.01` in
`.inputc`. There the delay is unnoticable. With fish and 10 msec it's nearly
half a second. I've also noticed now that entering insert mode from command
mode also takes a very long time, same as escape; at least 300 msec. So
this issue is perhaps not related to the aformentioned setting.
|
I just reinstalled 2.7.1 (I recommend upgrading to 3.0.2 btw!), and I can't say I can reproduce this. What does |
|
This is the full extent of my fish config:
|
Ah, okay. Yeah, see that "force-repaint" there? That forces fish to repaint the prompt. And since it doesn't know which part will be different, it has to execute the entire thing. Which means it'll call I also recommend upgrading to 3.0.2, since that's generally quite a bit faster. |
So regular bash don't have to repaint the prompt? I'm using the same prompt there |
Yes, bash does not have the assumption that the prompt can change because of vi-mode. It doesn't feature a mode indicator. |
Problem solved by changing to a lighter prompt. Is there a way to get a thin and blocky cursor for insert mode and command mode respectively? That would diminish the need to have the vi mode displayed in the prompt. |
If your terminal supports it, |
Okay, I've now added a commit that makes it so this only reexecutes the That should cut the time down significantly. |
After some careful thought, I've added 99dd6d7 which only uses fish_mode_prompt if it exists. Otherwise it acts like a normal repaint. I'd assume there are people out there who have a mode indicator at another place in their prompt, and they seem to be okay with the time it takes. So they'd simply have to not define a fish_mode_prompt function (i.e. an empty file, not just an empty function) at all. |
Huh I didn't even know about |
@faho this has broken my config on the latest master - in which I have my own mode prompt inside |
Remove fish_mode_prompt. I.e. create an empty file at ~/.config/fish/functions/fish_mode_prompt.fish |
Thanks that worked! - perhaps this new behavior ought to be mentioned in the docs somewhere though |
Updated to make even clearer in c5e535e. |
Setting fish_escape_delay_ms to 10 produces no change; exiting vi-mode is still very slow.
fish 2.7.1, kernel 5.0.3-200.fc29.x86_64, tried both tilix and urxvt
The text was updated successfully, but these errors were encountered: