key-bindings.zsh 1.3 KB

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