zshrc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 lsa='ls -a --color=auto'
  24. alias lls='ls -lh --color=auto'
  25. alias ll='ls -lh --color=auto'
  26. # Use vim as the default text editor
  27. export VISUAL=vim
  28. # Home and End keysjump the the beginning/end of the command
  29. bindkey "^[OH" beginning-of-line
  30. bindkey "^[OF" end-of-line
  31. # Ctrl-Left and Ctrl-Right keys move between words
  32. bindkey ";5C" forward-word
  33. # bindkey "^[[C" forward-word
  34. bindkey ";5D" backward-word
  35. # bindkey "^[[D" backward-word
  36. # alias for vim muscle memory when quitting
  37. alias :q='exit'
  38. # eval used by thefuck
  39. if hash fuck 2>/dev/null; then
  40. eval $(thefuck --alias)
  41. fi
  42. # timestamp alias for dates
  43. alias ts='date +%y-%m-%d'
  44. # default to terminal emacs
  45. alias emacs='emacs -nw'