key-bindings.zsh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # TODO: Explain what some of this does..
  2. autoload -U compinit
  3. compinit
  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. # consider emacs keybindings:
  20. #bindkey -e ## emacs key bindings
  21. #
  22. #bindkey '^[[A' up-line-or-search
  23. #bindkey '^[[B' down-line-or-search
  24. #bindkey '^[^[[C' emacs-forward-word
  25. #bindkey '^[^[[D' emacs-backward-word
  26. #
  27. #bindkey -s '^X^Z' '%-^M'
  28. #bindkey '^[e' expand-cmd-path
  29. #bindkey '^[^I' reverse-menu-complete
  30. #bindkey '^X^N' accept-and-infer-next-history
  31. #bindkey '^W' kill-region
  32. #bindkey '^I' complete-word
  33. ## Fix weird sequence that rxvt produces
  34. #bindkey -s '^[[Z' '\t'
  35. #