zsh
Open 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 .zshrc
configuration 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 .zshrc
the configuration.
Issues related to the zsh-autosuggestions
project isuue
are discussed on.
Solutions of this article came from isuue .