an unsuggest widget #23

Closed
257 opened this Issue Apr 8, 2014 · 4 comments

3 participants

@257
257 commented Apr 8, 2014
  • i don't know if the following is possible to do. it's more of a support question than a bug report bit couldn't find mailing-list of irc channel for the project.
  • this is mainly the behaviour of autocompletion in apple's Safari address bar. i think webkit drivatives (e.g. chrome) do the same if you don't have access to osx.
  • i will try to expalin this as best as i can but please let me know if it's not clear.

say user types 'vi' and suggestion is provided in front of the cursor as '~/.zshrc'. now:

  1. user wants this [accept]
  2. user wants to stop right up to what he's typed in. [unsuggest] .. and perhaps continue later one. [suggest-ON]
  3. user wants this to be modified. [edit]

a. to aceept, majority of cases since we know how good zsh-autosuggestions is, is default.
b. to unsuggest, to just take the suggestion out of the line, right now deletes the last char typed by the user.
to turn suggestion back ON, .
c. to edit, . notice that now the suggestion becomes real, it's inserted for the user to edit and mode is changed into vicmd.

  1. a menu of suggestions which can be cycled through with
@257
257 commented Apr 8, 2014

i thought this would take care of 2.

bindkey '\b' autosuggest-toggle

but then normal backspace doesn't work

@257
257 commented Apr 8, 2014

and then how do we turn it back ON? hitting backspace again i suppose but i would rather map it into '\t'. that is, instead of toggle one widget for ON and one for OFF.

@257
257 commented Apr 8, 2014

hmm, backspace not working as before feels like good old school vi

@257
257 commented Apr 8, 2014

autosuggest-accept-* should just execute the suggest/found command, IMHO.

@faceleg faceleg added the question label Dec 9, 2014
@ericfreese ericfreese added enhancement and removed question labels Jan 30, 2016
@ericfreese ericfreese closed this Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment