.zshrc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # System-specific additions
  2. # ---------------------------------------------------------
  3. source ~/.zsh_additions
  4. # Term setting
  5. # ---------------------------------------------------------
  6. export TERM='xterm-256color'
  7. # History settings
  8. # ---------------------------------------------------------
  9. HISTFILE=~/.histfile
  10. HISTSIZE=1000
  11. SAVEHIST=1000
  12. # Enable Antigen plugin installer
  13. # ---------------------------------------------------------
  14. source ~/src/lib/antigen/antigen.zsh
  15. antigen use oh-my-zsh
  16. antigen theme agnoster/agnoster-zsh-theme
  17. antigen bundle command-not-found
  18. antigen bundle compleat
  19. antigen bundle git
  20. antigen bundle gitfast
  21. antigen bundle git-extras
  22. antigen bundle git-flow
  23. antigen bundle git-remote-branch
  24. antigen bundle sudo
  25. antigen bundle thefuck
  26. antigen bundle vi-mode
  27. antigen bundle zsh-navigation-tools
  28. antigen bundle zsh-users/zsh-completions
  29. antigen bundle zsh-users/zsh-syntax-highlighting
  30. antigen apply
  31. # Oh-my-zsh settings
  32. # ---------------------------------------------------------
  33. COMPLETION_WAITING_DOTS="true"
  34. HIST_STAMPS="yyyy-mm-dd"
  35. ZSH_THEME=agnoster
  36. # Configure Zsh Navigation Tools
  37. # ---------------------------------------------------------
  38. autoload znt-history-widget
  39. zle -N znt-history-widget
  40. bindkey "^R" znt-history-widget
  41. zle -N znt-cd-widget
  42. bindkey "^A" znt-cd-widget
  43. zle -N znt-kill-widget
  44. bindkey "^Y" znt-kill-widget
  45. # Configure thefuck
  46. # ---------------------------------------------------------
  47. eval $(thefuck --alias)
  48. # Compinit settings
  49. # ---------------------------------------------------------
  50. zstyle :compinstall filename '~/.zshrc'
  51. zstyle ':completion:*' menu select
  52. setopt COMPLETE_ALIASES
  53. autoload -Uz compinit
  54. compinit
  55. # GPG TTY setting for signing Git commits
  56. # ---------------------------------------------------------
  57. export GPG_TTY=$(tty)
  58. # Standardize listings
  59. # ---------------------------------------------------------
  60. alias ls="ls -hkv --color=always --group-directories-first"
  61. if [ -x "`which dircolors`" -a -r "$HOME/.dir_colors" ]; then
  62. eval `dircolors -b "$HOME/.dir_colors"`
  63. fi
  64. alias l="ls -1"
  65. alias la="ls -A"
  66. alias ll="ls -l"
  67. alias lla="ls -la"
  68. alias lr="ls -R"
  69. alias lrt="ls -lrt"
  70. # Fix to make custom listings work with sudo
  71. # ---------------------------------------------------------
  72. alias sudo="sudo "
  73. # Shortcuts
  74. # ---------------------------------------------------------
  75. alias ga="git add ."
  76. # Vim key bindings
  77. # ---------------------------------------------------------
  78. bindkey -v
  79. KEYTIMEOUT=5
  80. reset-cursor() {
  81. printf '\033]50;CursorShape=1\x7'
  82. }
  83. export PS1="$(reset-cursor)$PS1"
  84. # Prompt theming
  85. # ---------------------------------------------------------
  86. autoload -Uz promptinit
  87. promptinit