zshrc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # local zsh config
  2. source ~/.zshrc.local
  3. # History
  4. HISTFILE=~/.histfile
  5. HISTSIZE=10000
  6. SAVEHIST=10000
  7. # Instantly write history
  8. setopt -o sharehistory
  9. # Ignore duplicates in history
  10. setopt HIST_IGNORE_DUPS
  11. # Delete old recorded entry if new entry is a duplicate.
  12. setopt HIST_IGNORE_ALL_DUPS
  13. setopt appendhistory autocd extendedglob nomatch
  14. bindkey -e
  15. zstyle :compinstall filename '/home/josh/.zshrc'
  16. autoload -Uz compinit
  17. compinit
  18. # List of word delimeters
  19. WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
  20. # ls pleasantness
  21. alias l='\ls --color=auto'
  22. alias ls='ls --color=auto'
  23. alias la='ls -a --color=auto'
  24. alias lsa='ls -a --color=auto'
  25. alias lls='ls -lh --color=auto'
  26. alias ll='ls -lh --color=auto'
  27. # Use vim as the default text editor
  28. export VISUAL=vim
  29. # Home and End keysjump the the beginning/end of the command
  30. bindkey "^[OH" beginning-of-line
  31. bindkey "^[OF" end-of-line
  32. # Ctrl-Left and Ctrl-Right keys move between words
  33. bindkey ";5C" forward-word
  34. # bindkey "^[[C" forward-word
  35. bindkey ";5D" backward-word
  36. # bindkey "^[[D" backward-word
  37. # alias for vim muscle memory when quitting
  38. alias :q='exit'
  39. # eval used by thefuck
  40. if hash fuck 2>/dev/null; then
  41. eval $(thefuck --alias)
  42. fi
  43. # timestamp alias for dates
  44. alias ts='date +%y-%m-%d'
  45. # default to terminal emacs
  46. alias emacs='emacs -nw'