key-bindings.zsh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # TODO: Explain what some of this does..
  2. bindkey -e
  3. bindkey '\ew' kill-region
  4. bindkey -s '\el' "ls\n"
  5. bindkey -s '\e.' "..\n"
  6. bindkey '^r' history-incremental-search-backward
  7. bindkey "^[[5~" up-line-or-history
  8. bindkey "^[[6~" down-line-or-history
  9. # make search up and down work, so partially type and hit up/down to find relevant stuff
  10. bindkey '^[[A' up-line-or-search
  11. bindkey '^[[B' down-line-or-search
  12. bindkey "^[[H" beginning-of-line
  13. bindkey "^[[1~" beginning-of-line
  14. bindkey "^[[F" end-of-line
  15. bindkey "^[[4~" end-of-line
  16. bindkey ' ' magic-space # also do history expansion on space
  17. bindkey '^[[Z' reverse-menu-complete
  18. # Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~
  19. bindkey "^[[3~" delete-char
  20. bindkey "^[3;5~" delete-char
  21. bindkey "\e[3~" delete-char
  22. # consider emacs keybindings:
  23. #bindkey -e ## emacs key bindings
  24. #
  25. #bindkey '^[[A' up-line-or-search
  26. #bindkey '^[[B' down-line-or-search
  27. #bindkey '^[^[[C' emacs-forward-word
  28. #bindkey '^[^[[D' emacs-backward-word
  29. #
  30. #bindkey -s '^X^Z' '%-^M'
  31. #bindkey '^[e' expand-cmd-path
  32. #bindkey '^[^I' reverse-menu-complete
  33. #bindkey '^X^N' accept-and-infer-next-history
  34. #bindkey '^W' kill-region
  35. #bindkey '^I' complete-word
  36. ## Fix weird sequence that rxvt produces
  37. #bindkey -s '^[[Z' '\t'
  38. #