diff --git a/.zshrc b/.zshrc index 3214a83..6f2c3ad 100644 --- a/.zshrc +++ b/.zshrc @@ -18,6 +18,17 @@ for f in $OTHER/*.zsh; do fi done +# Turn control+z into a toggle switch +ctrlz() { + if [[ $#BUFFER == 0 ]]; then + fg >/dev/null 2>&1 && zle redisplay + else + zle push-input + fi +} +zle -N ctrlz +bindkey '^Z' ctrlz + if [ -d "$HOME/.zsh-custom" ]; then for f in $HOME/.zsh-custom/*; do if [ -f $f ]; then