zshrc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. HISTFILE=~/.histfile
  2. HISTSIZE=1000000
  3. SAVEHIST=1000000
  4. setopt incappendhistory nomatch correct NO_HUP
  5. unsetopt beep
  6. bindkey -v
  7. zstyle :compinstall filename '/Users/drew/.zshrc'
  8. autoload -Uz compinit
  9. compinit
  10. autoload -U colors && colors
  11. # Have to reset color to cyan after the bold tags for some reason.
  12. PROMPT="%{$fg[cyan]%}[%n@%M %B%1~%b%{$fg[cyan]%}]%# %{$reset_color%}"
  13. alias ll='ls -alF'
  14. alias la='ls -A'
  15. alias l='ls -CF'
  16. alias ls='ls -G'
  17. export EDITOR="nvim"
  18. alias vim="nvim"
  19. # OS X completions
  20. fpath=(/usr/local/share/zsh-completions $fpath)
  21. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  22. # OS X keep current PWD when opening new tabs/windows
  23. precmd () {print -Pn "\e]2; %~/ \a"}
  24. preexec () {print -Pn "\e]2; %~/ \a"}
  25. dot_sync() {
  26. current_branch=$(git branch | grep '\*.*' | cut -d '*' -f 2 | tr -d ' ')
  27. if [ -z "$1" ]; then
  28. 1=$current_branch
  29. fi
  30. for branch in $(git branch | grep '^[^*].*$'); do
  31. git ch $branch
  32. git cherry-pick $1 || { echo 'Problems.. manually cherry-pick'; return 0 }
  33. done
  34. git ch $current_branch
  35. }
  36. rmorig() {
  37. if [ "$1" = "-f" ]; then
  38. find . -name "*.orig" -print -delete
  39. else
  40. find . -name "*.orig" -print
  41. fi
  42. }
  43. # Set Home, End, Del, PgUp, PgDown keys to actually do something.
  44. bindkey '^[OH' beginning-of-line
  45. bindkey '^[OF' end-of-line
  46. bindkey '^[[3~' delete-char
  47. bindkey '^[[5~' beginning-of-buffer-or-history
  48. bindkey '^[[6~' end-of-buffer-or-history
  49. export PAGER=less
  50. export DOTFILES=$HOME/Documents/dotfiles
  51. export PATH=$DOTFILES/bin:$PATH
  52. export PATH=$PATH:$HOME/.rvm/bin
  53. export PATH=$PATH:$GOPATH/bin
  54. export PATH=$PATH:$HOME/.cargo/bin
  55. export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
  56. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  57. alias ack=ag
  58. # added by travis gem
  59. [ -f $HOME/.travis/travis.sh ] && source $HOME/.travis/travis.sh
  60. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  61. export PATH="/usr/local/opt/icu4c/bin:$PATH"
  62. export PATH="/usr/local/opt/icu4c/sbin:$PATH"
  63. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  64. export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
  65. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  66. plugins=(
  67. aws
  68. bundler
  69. cargo
  70. docker
  71. docker-compose
  72. git
  73. npm
  74. npx
  75. rails
  76. rake
  77. ruby
  78. rust
  79. rvm
  80. yarn
  81. yarn
  82. )