vi-end-of-line does not highlight text properly #13

Closed
alexbw opened this Issue Jan 4, 2014 · 10 comments

6 participants

@alexbw

On the current master, bindkey '^f' vi-end-of-line properly autocompletes, but does not change the autocompletion color.

@alexbw

And also, how would you suggest using to accept words of the autosuggestion, and then vi-end-of-line to accept the full line? This would fully replicate fish functionality.

@tarruda

Any widget that moves the cursor to the right should highlight, eg:

bindkey '^f' vi-forward-word  # accept word
bindkey '^x' vi-end-of-line    # accept line

I use it in conjunction with zsh-history-substring-search, and most of the times pressing k or up arrow highlights the entire suggestion, but its kinda buggy right now and I've been pretty busy to fix it

@257
257 commented Apr 7, 2014

how about for completion and execution all in one shot?
i mean if the user hasn't found a match then i would imagine that he would be still typing and if he has found one then well he's gonna excute it anyway.
except when he wants to modify a found match. now a key to enter the insert mode would be needed.
it comes down to wheather you think user's mostly want to edit the history or rather reaping it. i would say the latter and that would mean that 1-2-1 mapping between vi-modes and any shell/pager/browser is not smart [enough]. in those, users mostly search/view/browse rather than edit and i would suggest adding an extra mode would help. you can think of it as a search-mode with a nice option for people to have it as a default mode.
i can explain more if it's not clear.

@257
257 commented Apr 7, 2014

ok i take back what i said, it does what i wanted it with this:

bindkey '\t' vi-forward-blank-word-end

now only if i could have a menu of suggestions that i could tab through.

@jirutka

how about for completion and execution all in one shot?

@257 I’ve implemented it in #61, autosuggest-execute-suggestion.

@faceleg faceleg closed this May 22, 2015
@jirutka

@faceleg This shouldn’t be closed, the problem described in the title is still here (I’ve reproduced it). I’ll take a look at it later.

@257

(going out on a tangent here)
@jirutka this might interest you:
fish-shell/fish-shell#1465

@257

@jirutka and so might these:
hchbaw/auto-fu.zsh#36
fish-shell/fish-shell#1419

i can open a new issue for this (i.e. backspace deletes suggestion first and only then it starts deleting typed chars), just let me know.

i'm using auto-fu right now but i'm willing to switch to zsh-autosuggestions and help out in anyway i can if i see progress on this.

@faceleg faceleg reopened this May 22, 2015
@faceleg

My bad!

@faceleg faceleg added the bug label May 23, 2015
@ericfreese
zsh-users member

There's a rewrite underway in PR #91. It's available on branch v0.1.x. Please try using that branch, and let me know if it solves your problem.

@ericfreese ericfreese closed this Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment