zsh-autosuggestions seems Incompatible with zsh-syntax-highlighting #27

Closed
ruanyl opened this Issue Jun 29, 2014 · 4 comments

2 participants

@ruanyl

Here is settings for zsh-autosuggestions:
image

And settings for zsh-syntax-highlighting:
image

I got these errors each time I press arrow key UP and DOWN:
image

image

But if I remove any one of those two settings, the errors disappeared.

@ruanyl

I solved this by adding zsh-syntax-highlighting as an plugin:
image

Now everything works well. Though I dont know why..

@ruanyl ruanyl closed this Oct 1, 2014
@jirutka

I’m using both zsh-autosuggestions and zsh-syntax-highlighting with Antigen and it works well.

source $ADOTDIR/antigen.zsh

antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle tarruda/zsh-autosuggestions
antigen apply

zmodload zsh/terminfo

# Make sure the terminal is in application mode, when zle is active. Only then
# are the values from $terminfo valid. And also activate autosuggestions.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then

    function zle-line-init () {
        printf '%s' "${terminfo[smkx]}"

        # Enable autosuggestions automatically
        zle autosuggest-start
    }

    function zle-line-finish () {
        printf '%s' "${terminfo[rmkx]}"
    }

    zle -N zle-line-init
    zle -N zle-line-finish
fi
@ruanyl

@jirutka Thank you! Antigen looks awesome, probably I need to have a try 😄

@jirutka

You should. 😉 However, you should now that Antigen has one big problem – it’s very slow, due to some bad design decisions. I’m planning to fix this problem, it’s quite easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment