key-bindings.zsh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 "^[OH" beginning-of-line
  15. bindkey "^[[F" end-of-line
  16. bindkey "^[[4~" end-of-line
  17. bindkey "^[OF" end-of-line
  18. bindkey ' ' magic-space # also do history expansion on space
  19. bindkey "^[[1;5C" forward-word
  20. bindkey "^[[1;5D" backward-word
  21. bindkey '^[[Z' reverse-menu-complete
  22. # Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~
  23. bindkey '^?' backward-delete-char
  24. bindkey "^[[3~" delete-char
  25. bindkey "^[3;5~" delete-char
  26. bindkey "\e[3~" delete-char
  27. # consider emacs keybindings:
  28. #bindkey -e ## emacs key bindings
  29. #
  30. #bindkey '^[[A' up-line-or-search
  31. #bindkey '^[[B' down-line-or-search
  32. #bindkey '^[^[[C' emacs-forward-word
  33. #bindkey '^[^[[D' emacs-backward-word
  34. #
  35. #bindkey -s '^X^Z' '%-^M'
  36. #bindkey '^[e' expand-cmd-path
  37. #bindkey '^[^I' reverse-menu-complete
  38. #bindkey '^X^N' accept-and-infer-next-history
  39. #bindkey '^W' kill-region
  40. #bindkey '^I' complete-word
  41. ## Fix weird sequence that rxvt produces
  42. #bindkey -s '^[[Z' '\t'
  43. #