diff --git a/zsh/.zshrc b/zsh/.zshrc index 27a91f9..48886c2 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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"