key-bindings.zsh 1.4 KB

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