Skip to content

Instantly share code, notes, and snippets.

Star You must be signed in to star a gist
What would you like to do?
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
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
### Fix slowness of pastes
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Copy link

it works for me, thanks

Copy link

ToontjeM commented Dec 5, 2022

Please submit to the zsh-syntax-highlighting maintainer as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment