配置文件位置:

  1. ~/.zshrc

启动配置:

  1. source ~/.zshrc

原来的是:~/.bashrc

https://ohmyz.sh/

重新绑定按键:

  1. # key bindings
  2. bindkey "\e[1~" beginning-of-line
  3. bindkey "\e[4~" end-of-line
  4. bindkey "\e[5~" beginning-of-history
  5. bindkey "\e[6~" end-of-history
  6. # for rxvt
  7. bindkey "\e[8~" end-of-line
  8. bindkey "\e[7~" beginning-of-line
  9. # for non RH/Debian xterm, can't hurt for RH/DEbian xterm
  10. bindkey "\eOH" beginning-of-line
  11. bindkey "\eOF" end-of-line
  12. # for freebsd console
  13. bindkey "\e[H" beginning-of-line
  14. bindkey "\e[F" end-of-line
  15. # completion in the middle of a line
  16. bindkey '^i' expand-or-complete-prefix
  17. # Fix numeric keypad
  18. # 0 . Enter
  19. bindkey -s "^[Op" "0"
  20. bindkey -s "^[On" "."
  21. bindkey -s "^[OM" "^M"
  22. # 1 2 3
  23. bindkey -s "^[Oq" "1"
  24. bindkey -s "^[Or" "2"
  25. bindkey -s "^[Os" "3"
  26. # 4 5 6
  27. bindkey -s "^[Ot" "4"
  28. bindkey -s "^[Ou" "5"
  29. bindkey -s "^[Ov" "6"
  30. # 7 8 9
  31. bindkey -s "^[Ow" "7"
  32. bindkey -s "^[Ox" "8"
  33. bindkey -s "^[Oy" "9"
  34. # + - * /
  35. bindkey -s "^[Ol" "+"
  36. bindkey -s "^[Om" "-"
  37. bindkey -s "^[Oj" "*"
  38. bindkey -s "^[Oo" "/"