Search code examples
zshkey-bindingsoh-my-zshzsh-completion

How do I remap the `tab` key in zsh-autosuggestion to replace the →


In zsh-autosuggestions the TAB key accepts the suggestion but then also tries providing more suggestions, which is a difference in behaviour from fish-shell.
In fish if you Tab it completes the word and doesn't offer anything else until you start typing something more (ie suggestions aren't triggered on whitespace).
In zsh-autosuggestions, you can only get this behaviour by using the key.

So how can I remap the to behave like Tab (or alternatively how can I remap Tab to behave like ).

Thanks


Solution

  • from the docs:

    bindkey '^ ' autosuggest-accept
    

    my setting, which binds ctrl+space to accept then execute the suggestion:

    bindkey '^ ' autosuggest-execute