zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.81k stars 1.85k forks source link

One word accept #627

Closed rejexy closed 2 years ago

rejexy commented 3 years ago

Is your feature request related to a problem? Please describe.

I may not have understood the configuration well enough, but it would be nice to be able to accept only one word from the suggested string.

RyanGibb commented 3 years ago

From the README:

If you invoke the forward-word widget, it will partially accept the suggestion up to the point that the cursor moves to.

So if you have the binding set up Control-Right will do this.

Alternatively, with vi keybinds (bindkey -v), Esc-w-Enter or Esc-W-Enter, for a word or WORD respectively, will also work.

NightMachinery commented 2 years ago

@reinhrst Can we add a cycling mechanic like emacs dabbrev-expand? If the user invokes the one-word completor again, autosuggestions should erase the previous completion, and use the one from the next best candidate.

reinhrst commented 2 years ago

@NightMachinary not sure you tagged the right person here...

ericfreese commented 2 years ago

Closing since the original question was answered