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

How to rebind keys in completion menu? #12584

Open
DavidTelenko opened this issue Apr 19, 2024 · 0 comments
Open

How to rebind keys in completion menu? #12584

DavidTelenko opened this issue Apr 19, 2024 · 0 comments
Labels
question the issue author asks something

Comments

@DavidTelenko
Copy link

Question

Is there any way to rebind keys in a completion menu in nushell.

Default behavior is the following:
Tab opens completion menus and if it is already opened Tab selects next element and Enter accepts suggestion.

I want to be able to rebind so this behavior change to the following:
Tab opens menu and if it is already opened Tab accepts suggestion, Enter closes menu. (In my case there is a system-wise rebinding for the arrow keys so Alt+j and Alt+k selects upper and lower element in list).

Currently I have this config, but reading documentation I cannon wrap my head around what needs to be changed in order for desired changes to take effect:

        {
            name: ide_completion_menu
            modifier: none
            keycode: tab
            mode: [emacs vi_normal vi_insert]
            event: {
                until: [
                    { send: menu name: ide_completion_menu }
                    { send: menunext }
                    { edit: complete }
                ]
            }
        }

I though about changing the edit: complete to send: complete but there is no such event as complete.

Thanks everyone in advance.

Additional context and details

No response

@DavidTelenko DavidTelenko added the question the issue author asks something label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question the issue author asks something
Projects
None yet
Development

No branches or pull requests

1 participant