zshrc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Lines configured by zsh-newuser-install
  2. HISTFILE=~/.histfile
  3. HISTSIZE=1000
  4. SAVEHIST=1000
  5. setopt incappendhistory nomatch correct
  6. unsetopt beep
  7. bindkey -v
  8. zstyle :compinstall filename '/home/drew/.zshrc'
  9. autoload -Uz compinit
  10. compinit
  11. export PATH="$PATH:$HOME/.rvm/bin"
  12. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  13. export EDITOR="vim"
  14. autoload -U colors && colors
  15. # Have to reset color to cyan after the bold tags for some reason.
  16. PROMPT="%{$fg[cyan]%}[%n@%M %B%1~%b%{$fg[cyan]%}]%# %{$reset_color%}"
  17. alias ll='ls -alF'
  18. alias la='ls -A'
  19. alias l='ls -CF'
  20. alias ls='ls --color=auto'
  21. # Allow ctrl+S in vim to save files, ie pass
  22. # the command to vim when vim is open.
  23. vim() {
  24. local STTYOPTS="$(stty --save)"
  25. stty stop '' -ixoff
  26. command vim --servername vim "$@"
  27. stty "$STTYOPTS"
  28. }
  29. # Set Home, End, Del, PgUp, PgDown keys to actually do something.
  30. bindkey '^[OH' beginning-of-line
  31. bindkey '^[OF' end-of-line
  32. bindkey '^[[3~' delete-char
  33. bindkey '^[[5~' beginning-of-buffer-or-history
  34. bindkey '^[[6~' end-of-buffer-or-history
  35. if [ -x /usr/bin/ssh-agent -a -z "$SSH_AUTH_SOCK" ]; then
  36. eval "$(keychain --eval -Q -q --agents ssh `find $HOME/.ssh/* ! -name '*.pub' ! -name 'config' ! -name 'known_hosts'`)"
  37. fi
  38. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh