Created
August 5, 2020 01:35
-
-
Save usagi/20d755a57840a054fdf70ae7108e1350 to your computer and use it in GitHub Desktop.
This file contains 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
autoload predict-on | |
alias predict.on="predict-on && export ZSH_PREDICT_STATE=0" | |
alias predict.off="predict-off && export ZSH_PREDICT_STATE=1" | |
predict.on | |
predict.toggle() | |
{ | |
if [ $ZSH_PREDICT_STATE -eq 0 ] | |
then predict.off; | |
else predict.on; | |
fi; | |
} | |
zle -N predict.toggle | |
bindkey "^[[2~" predict.toggle | |
bindkey "^[[Z" predict.toggle | |
zstyle ':predict' verbose true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment