Created
May 23, 2020 08:52
-
-
Save lixianyang/d2fd81b2e0d6668501b8afeb2ef9dd63 to your computer and use it in GitHub Desktop.
ohmyzsh 粘贴卡顿
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/zsh-users/zsh-autosuggestions/issues/238#issuecomment-389324292 | |
| ```shell | |
| # 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 | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment