Giter Site home page Giter Site logo

Comments (7)

marlonrichert avatar marlonrichert commented on May 18, 2024 1

Thanks for reporting this. This is one config permutation that I hadn’t considered. The Down key doesn’t do menu selection if you don’t use fzf, because then you need the Down key to go forward when doing history search. However, I failed to realize that then you don’t have a way to enter menu selection.

I will fix this by making it so that, if you don’t use fzf, I will not override the Tab key behavior. I’ll let you know when I’ve pushed in a fix.

Apologies for the inconvenience!

from zsh-autocomplete.

romzie avatar romzie commented on May 18, 2024 1

@marlonrichert Okay just pulled and tested it. Here is my feedback :

  • pressing tab activates completion or triggers the grid list of suggestions as expected
  • pressing tab a second time enters the suggestions list as expected
  • once inside the suggestions list, using arrow keys and enter to select works as expected
  • but if I want to use the tab key to cycle through the suggestions, it messes up as seen here (pressing tab writes a space and re-write all the path until the next element of the list, more clear on the video).

Thanks for the quick reply !

from zsh-autocomplete.

romzie avatar romzie commented on May 18, 2024 1

Well you got me there, I did not read enough of the README.

Thank you for adding those additionnal key binding choices to the README.
If I may be a little picky, I would prefer having custom variables to trigger those key bindings instead of those difficult-to-understand lines, but that's up to you.

Closing this issue, keep up the great job! Love this plugin now btw.

from zsh-autocomplete.

marlonrichert avatar marlonrichert commented on May 18, 2024 1

@romzie I added more info to the Readme on how to customize the behavior of zsh-autocomplete. Hopefully that helps. 🙂

from zsh-autocomplete.

marlonrichert avatar marlonrichert commented on May 18, 2024

@romzie I pushed in a fix. Please update and try it out.

from zsh-autocomplete.

marlonrichert avatar marlonrichert commented on May 18, 2024

@romzie This behavior is entirely intentional on my part and not a bug. It is exactly as specified in the Readme under "Key bindings in the completion menu". 🙂

Since you can already move around in the menu using the arrow keys, zsh-autocomplete uses the Tab key to insert multiple selections without leaving the menu. To insert only one and exit immediately, press Return instead. It works this way in fzf, too, when you have multi-select enabled.

If you want to disabled this, just add the following to your .zshrc file after sourcing zsh-autocomplete:

bindkey -M menuselect $key[Tab] menu-complete

from zsh-autocomplete.

marlonrichert avatar marlonrichert commented on May 18, 2024

Oh, and if you want Shift-Tab to cycle in the opposite direction while in the menu, rather than show more completions/info, add the following:

add-zle-hook-widget -d line-init _zsh_autocomplete__h__keymap-specific_keys
bindkey -M menuselect $key[BackTab] reverse-menu-complete

from zsh-autocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.