|
|
@@ -48,3 +48,17 @@ fi
|
|
|
if [[ "${terminfo[kcud1]}" != "" ]]; then
|
|
|
bindkey "${terminfo[kcud1]}" down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward
|
|
|
fi
|
|
|
+
|
|
|
+# Ctrl-z for `fg`
|
|
|
+# From http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/
|
|
|
+fancy-ctrl-z () {
|
|
|
+ if [[ $#BUFFER -eq 0 ]]; then
|
|
|
+ BUFFER="fg"
|
|
|
+ zle accept-line
|
|
|
+ else
|
|
|
+ zle push-input
|
|
|
+ zle clear-screen
|
|
|
+ fi
|
|
|
+}
|
|
|
+zle -N fancy-ctrl-z
|
|
|
+bindkey '^Z' fancy-ctrl-z
|