About zsh-autosuggestions plug leads to paste the contents of very slow problem

zshOpen autosuggestions 插件time, when pasting a lot of content in the terminal, will be pasted very slow, basically a paste of a character's character.

solution

In the .zshrcconfiguration file the following:

# This speeds up pasting w/ autosuggest
# https://github.com/zsh-users/zsh-autosuggestions/issues/238
pasteinit() {
  OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
  zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}

pastefinish() {
  zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish

Re-enable the configuration source .zshrc, or re-open the terminal, it will automatically load .zshrcthe configuration.

Issues related to the zsh-autosuggestionsproject isuueare discussed on.

Solutions of this article came from isuue .

Guess you like

Origin www.cnblogs.com/zzhaolei/p/11246128.html