Skip to content

[ Help!! ] how to bind l to auto-complete the suggestion in vi-mode #9414

Closed Answered by krobelus
NEX-S asked this question in Q&A
Discussion options

You must be logged in to vote

yeah vi-mode as some usability issues, we should fix them

as workaround you can use this binding:

function forward-char-and-accept-autosuggestion-if-at-end
    set -l right_of_cursor "$(string sub "$(commandline)" --start (math (commandline --cursor) + 2))"
    commandline -f forward-char
    if test -z $right_of_cursor
        commandline -f accept-autosuggestion
    end
end
bind l forward-char-and-accept-autosuggestion-if-at-end

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NEX-S
Comment options

Answer selected by faho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants