Today I Learned - How to fix slow pasting in zsh
Piotr Pliszko
Some time ago I encountered weird behavior when pasting long text into my terminal. Instead of just being instantly pasted into the terminal, it appeared slowly, symbol by symbol.
After some research, I've found that the problem was caused by the zsh-syntax-highlighting
plugin I use in my zsh
setup. This plugin enabled bracketed-paste-magic
, which turned out to be an issue.
Fortunately, the solution was simple. To fix this behavior, just add this line to your config:
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
Related GitHub issue: zsh-users/zsh-syntax-highlighting #295