diff --git a/.dotfiles/1-zsh b/.dotfiles/1-zsh index e56a025..20f67f3 100644 --- a/.dotfiles/1-zsh +++ b/.dotfiles/1-zsh @@ -1,13 +1,28 @@ export ZSH="$HOME/.oh-my-zsh" +export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 + plugins=( - asdf aws zsh-syntax-highlighting zsh-autosuggestions ) autoload -U compinit && compinit +# 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 +# https://github.com/zsh-users/zsh-autosuggestions/issues/351 +ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste accept-line) + DISABLE_UNTRACKED_FILES_DIRTY="true" SHOW_AWS_PROMPT=false