Skip to content
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

Bind all possible ex cmd abbreviations #1924

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

tomdl89
Copy link
Member

@tomdl89 tomdl89 commented Jul 17, 2024

Means that :de expands to delete

Means that :de expands to delete
@tomdl89 tomdl89 merged commit ca7c557 into emacs-evil:master Jul 17, 2024
12 checks passed
@axelf4
Copy link
Collaborator

axelf4 commented Jul 18, 2024

This is not correct: evil-ex-completed-binding already uses try-completion. At the very least it should not anymore, but I am not fond of how this change balloons the size of the evil-ex-commands list. Furthermore, it ignores the problem of collisions?

@tomdl89
Copy link
Member Author

tomdl89 commented Jul 18, 2024

  • evil-ex-completed-binding already uses try-completion

true, but I can't see that it's meaningfully different from using assoc and cdr to look up the binding in evil-ex-commands - if I'm missing something, we can make a change on this.

  • I am not fond of how this change balloons the size of the evil-ex-commands list.

so, I tested this before I merged to master. (length evil-ex-commands) was 167 before, and 334 after, so my conclusion is that it will make no significant difference, performance-wise. again, if I'm missing something (especially some data) that would change things, for sure

  • Furthermore, it ignores the problem of collisions?

I don't think so. it only makes bindings of the length of the mandatory part (i.e. before [) and longer (at which point we're not expecting collisions anyway). Do you have an example?

Also, more broadly, I won't pretend this isn't a reasonably quick and dirty fix to a problem that's been bothering me for a while. If you have a better fix in mind, I'm more than happy to replace my fix with yours. I'd be inclined to keep the change in the meantime, unless of course it's demonstrably less performant, or causes collisions I hadn't considered. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants