[ZSH] Fix slow paste

This commit is contained in:
Fabian Ising
2024-10-14 15:50:37 +02:00
parent cb4e36a568
commit 2a3bf65169

View File

@@ -67,6 +67,20 @@ function load_p10k() {
fi
}
load_p10k
#
# 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
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export TIME_STYLE="long-iso"