[ZSH] Fix slow paste
This commit is contained in:
13
zsh/.zshrc
13
zsh/.zshrc
@@ -85,3 +85,16 @@ load_p10k
|
|||||||
alias screenshot_mode='powerlevel10k_plugin_unload; export PS1="$ "; python3 ~/.config/alacritty/screenshot_mode.py on'
|
alias screenshot_mode='powerlevel10k_plugin_unload; export PS1="$ "; python3 ~/.config/alacritty/screenshot_mode.py on'
|
||||||
alias screenshot_mode_off='prompt_powerlevel9k_setup; python3 ~/.config/alacritty/screenshot_mode.py off'
|
alias screenshot_mode_off='prompt_powerlevel9k_setup; python3 ~/.config/alacritty/screenshot_mode.py off'
|
||||||
antidote update &> /dev/null &|
|
antidote update &> /dev/null &|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user