config.zsh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. if [ -f ~/.dircolors ]; then
  2. eval $(dircolors ~/.dircolors)
  3. fi
  4. alias ls="ls --color=auto --group-directories-first -F --quoting-style literal"
  5. alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
  6. autoload -U compinit && compinit
  7. zstyle ':completion:*' menu select
  8. zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
  9. zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
  10. HISTFILE="${HOME}/.zhistory"
  11. SAVEHIST=10000
  12. setopt inc_append_history
  13. setopt share_history
  14. setopt extended_history
  15. setopt histignorealldups
  16. setopt histignorespace
  17. setopt autocd
  18. setopt autopushd
  19. setopt longlistjobs
  20. setopt nohup
  21. setopt extended_glob
  22. setopt noglobdots
  23. setopt noshwordsplit
  24. bindkey -e
  25. # https://bbs.archlinux.org/viewtopic.php?pid=1170080#p1170080
  26. autoload up-line-or-beginning-search
  27. autoload down-line-or-beginning-search
  28. zle -N up-line-or-beginning-search
  29. zle -N down-line-or-beginning-search
  30. bindkey "^[[A" up-line-or-beginning-search
  31. bindkey "^[[B" down-line-or-beginning-search
  32. autoload -z edit-command-line
  33. zle -N edit-command-line
  34. bindkey "^X^E" edit-command-line
  35. bindkey '^R' zaw-history
  36. bindkey "${terminfo[khome]}" beginning-of-line
  37. bindkey "${terminfo[kend]}" end-of-line
  38. alias l="k -h"
  39. alias ssh="TERM=xterm-256color ssh"