ctrl-z.zsh 312 B

12345678910111213
  1. # From http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/
  2. # Perhaps the one actually-good idea from this post.
  3. fancy-ctrl-z () {
  4. if [[ $#BUFFER -eq 0 ]]; then
  5. BUFFER="fg"
  6. zle accept-line
  7. else
  8. zle push-input
  9. zle clear-screen
  10. fi
  11. }
  12. zle -N fancy-ctrl-z
  13. bindkey '^Z' fancy-ctrl-z