-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
space (magic-space) is too aggressive #2
Comments
Yes. Some behavior like in Vim for the |
@weilbith I don't use vim, so I have no idea what you're talking about there. Can you try to explain it in more detail? |
Thanks for our update. The problem I mentioned in the issue is gone. However, there is still a (similar) problem behavior is still not intuitive. I think space should not match accept suggestions. Suppose you have a following situation:
Pressing
Well, one would have wanted 'vim f g h'. Suggestion should be accepted only when Also, should also work similar to the 'longest' behavior as in vim's completeopt -- i.e. only insert the longest common text of the matches. Given:
Pressing |
Seconding the request for removal of this feature. So far I have found magic space to render my terminal more or less unusable as it will often insert inappropriate suggestions. It's also quite difficult to turn off with the recent update. |
Yes, maybe it would be nice to configure some behavior of this plugin. Accepting the "best match" automatically with space is very aggressive. There will be always a special case where the completion could be wrong. Especially when constructing awkward and super special chain commands. 😆 |
|
This one is very tricky to solve. Believe me, I have tried. Would one of you want to try your hand at it? I welcome all pull requests! 🙂 |
Can we just simply disable space? There is no much value I think this magic-space adds. |
I'll go for customizing the keybindings anyways. So I'll need to unbind default bindings and add my own ones after this plugin got loaded. I would be also fine to just get the widgets and do the binding myself. But I understand that without any binding this plugin is useless. So to make it work out of the box they are necessary. I think this is a critical decision for every plugin. Some allow to configure an option to disable default bindings. The advantage is that I must not care about the source order. Having this automated |
Thank you for looking into this, @marlonrichert. In my usage, I have indeed noticed some improvements to the
|
Here's another problematic case.
|
@nisavid Thanks for the very detailed reports! 👏🏽 I will investigate what is the best way to fix this and of course notify this thread when I’ve pushed in a fix. |
I haven't used this plugin much yet, I like it very much already. |
With the input above, just type Also, don't forget you can use the arrow keys in the completion menu. That, too, is often faster than tabbing around. (If you have |
@nisavid @wookayin @weilbith @Dwight-D All right, I've pushed in a fix. Rather than my previous approach of trying to check what not to correct, I've decided to use a whitelist of things that are safe to correct instead. With that, all of the cases you've listed above now pass, plus some more. Please give it a try. 🙂 Oh, and you can turn it off completely by adding the following to your zstyle ':completion:correct-word:*' tag-order '-' |
Closing this now. Please let me know if it needs to be reopened. |
Well, gosh darn, I just discovered that |
@nisavid @wookayin @weilbith @Dwight-D @Mallchad I just pushed in a major rewrite that hopefully fixes things once and for all. 😅 When you press Space, correction now works as follows:
Plus:
Finally, to disable correction completely, add this to your zstyle ':completion:correct-word:*' max-errors 0 Or you can set Hopefully, we can close this is issue now. 😁 |
Feels pretty fantastic so far. Nearly every feels just as it should be. |
I noticed a couple more edge cases where |
Since I haven't heard any complaints anymore, I'm guessing this is fine now. Closing. |
Currently, it automatically accepts the completion when there are completions (automatically) being shown.
Say we want to type
for a in 0 1 2; do
. There isa.py
that is file suggestion.Pressing space here, it will accept the completion:
which should not be the case.
The text was updated successfully, but these errors were encountered: