Skip to content

Numeric hotkeys (1–9) for quick opener selection in pick #3252

@lmnek

Description

@lmnek

yazi --debug output

NA

Please describe the problem you're trying to solve

I frequently use the prepend opener functionality for many different file types. When the list of available openers is long, it becomes repetitive and inefficient to navigate using only the up/down arrow keys. This makes the workflow slower and somewhat frustrating.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

I propose adding line numbers at the start of each option in the picker. Then, pressing a number key (1–9) would instantly select and open the corresponding option.

Example:
Image

The number keys are currently unbound in the picker, so this change wouldn’t introduce any keybinding conflicts.

If there are more than nine options, the additional ones could simply appear without index numbers, since items that deep in the list are typically less frequently used.

Additional context

I’ve already prototyped a quick implementation of this feature and will open a PR very soon.

Please let me know if you think this functionality would be better suited for inclusion in the base Yazi code or implemented as a plugin instead. The implementation is quite simple, and I’ve added a configuration option to enable or disable it, so if it’s considered too intrusive, it could be turned off by default.

Checklist

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions