zshrc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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'
  47. # grml
  48. if [ ! $ZSH_CUSTOM ]
  49. then
  50. # enable syntax highlighting
  51. source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  52. # enable C-s for forward search
  53. stty -ixon
  54. fi