..

解决 zsh 使用 zsh-autosuggestions 粘贴慢问题

https://github.com/zsh-users/zsh-autosuggestions/issues/238

编辑 .zshrc 配置

vim ~/.zshrc

粘贴以下内容

See #issuecomment-389324292

# 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