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
IPython 8 regression: escaping insert mode in vi editing mode takes too long. #13443
Comments
It appears that if you flip the setting
this is fixed. So, some Emacs bindings must use Escape + <some_other_key> sequence, which means we have to wait after ESC for another key press. Perhaps solution here is to not add Emacs bindings by default if vi editing mode is used? |
Same issue here. The setting helped with the editing commands not being written, but leaving insert mode is still slow and the commands I issue while switching from insert mode to normal mode are not taken into account. For example a Esc + dd typed fast will not delete the whole line. |
I also have the same issue as Ellana42. Adding |
Same issue as well, it makes vi mode essentially unusable |
The following configuration in
|
In addition to that mentioned above I also noticed that the cursor shape is set to |
I'm having the same issue with |
this took me a while to figure out and plagued me for so long! having emacs bindings default off if using vim seems like a good idea to me. I spent a while thinking the vi-mode was just not working |
The One disadvantage of this is that |
Maybe this should be a different issue, but it's also treating |
@max-sixty I managed to get CTRL-W to work by putting the following in
My ipython config file contains this, by the way:
|
There are multiple related issues reported in this thread. I may have found the cause. Summary: an Esc-related keybinding is making Details: As people noted previously in the thread, reducing The culprint is
So, you can comment out the above lines and your vi-mode should work fine. No need to mess with As noted before, your config should have the following lines.
I will submit a pull request if people have no objections. I think it makes sense to tie the offending lines to |
@minjae your solution of commenting out seems to work on my end, thanks! |
@minjae Thanks for that deep info! Did you ever open a PR to straighten out the behavior? |
@jtherrmann thanks for getting to making the PR. I was initially hoping for more concrete feedback, but even months after, it seems like there isn't much feedback. I still do not know what the correct behavior of |
I confirmed that this is now fixed as of IPython 8.8.0. To summarize, your config file must have the following lines:
No other workarounds are required. The second line is required for eliminating the delay when escaping insert mode. Thanks again to @minjae for providing the workaround in #13443 (comment). |
This works great!! It's let me remove a bunch of configs, such as those in prompt-toolkit/python-prompt-toolkit#192 (comment) Thanks a lot! |
After updating to IPython 8.0 and with vi editing mode enabled, it now takes about 1 second to exit insert mode and go back to nav mode. Even worse, if you hit ESC (to exit insert mode) and continue typing your editing command, exiting inset mode is cancelled altogether.
This is extremely jarring. For example: type something in insert mode hit ESC and start typing editing commands (e.g. dd to delete a line) and instead you get single d echoed in the line and exiting insert mode is cancelled altogether (you stay in insert mode).
This is a regression introduced in IPython 8, and there doesn't appear to be a setting that controls this delay.
The text was updated successfully, but these errors were encountered: