Skip to content

Command completion with tab key #1173

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaxGyver83
Copy link
Contributor

@MaxGyver83 MaxGyver83 commented Mar 18, 2024

In the command prompt, press <tab> to get a list of all available commands and pick one (using vis-menu). This works also after typing the first letters of a command (p.e. :la<tab>).

vis-command-completion

Implements #1167 (and #100 more or less).

I'm aware that @martanne wants to avoid this feature. But I want to share it anyway for those who want to apply this patch to their local vis build.

@MaxGyver83 MaxGyver83 changed the title Command completion with tab Command completion with tab key Mar 19, 2024
@mcepl
Copy link
Contributor

mcepl commented Mar 28, 2024

See also https://lists.sr.ht/~martanne/devel/%3C20240324225636.9318-1-mcepl@cepl.eu%3E for a discussion how to remove a warning caused by this patch.

@mcepl
Copy link
Contributor

mcepl commented Feb 20, 2025

I have a deep suspicion that 4970df0 breaks this patch.

@fischerling
Copy link
Contributor

I have a deep suspicion that 4970df0 breaks this patch.

It does indeed. But it is easily resolveable (a742dc3).

@MaxGyver83
Copy link
Contributor Author

It does indeed. But it is easily resolveable (a742dc3).

Cool, thank you!

@fischerling
Copy link
Contributor

It does indeed. But it is easily resolveable (a742dc3).

Cool, thank you!

You are welcome. Please double check it. But I use it on my main branch for some time now.

In the command prompt, press <tab> to get a list of all available
commands and pick one (using vis-menu). This works also after typing the
first letters of a command (p.e. `:la<tab>`).

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
@MaxGyver83
Copy link
Contributor Author

You are welcome. Please double check it. But I use it on my main branch for some time now.

I have rebased and force-pushed it. It seems to work.

@rnpnr
Copy link
Collaborator

rnpnr commented Feb 22, 2025

I'm honestly on the fence about this. I know martanne wants to avoid this but the code is trivial and it aids in discoverability which in my opinion is one of the biggest marks of a good piece of software (I don't mean via tutorials/help pages but those are nice too).

Of course there are more efficient ways of doing this, especially if vis stored the available commands in a trie, but with the code that is already here this is pretty good.

@mcepl
Copy link
Contributor

mcepl commented Feb 22, 2025

It does indeed. But it is easily resolveable (a742dc3).

This didn’t work for me (:t<TAB> does nothing), but I will try the latest commit yet.

@machinedgod
Copy link

Just as a side-observer, would this get merged or it will forever remain an optional patch (because Marc didn't think its the right way forward 10y ago - not being sarcastic, 10y is a long time for software evolution and change of opinion)

@mcepl
Copy link
Contributor

mcepl commented Jun 20, 2025

@MaxGyver83 FYI, https://lists.sr.ht/~martanne/devel/patches/60055

And yes, it is becoming ridiculous that this PR hasn’t been merged yet.

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.

5 participants