zshrc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Lines configured by zsh-newuser-install
  2. HISTFILE=~/.histfile
  3. HISTSIZE=1000
  4. SAVEHIST=1000
  5. setopt appendhistory autocd extendedglob nomatch
  6. bindkey -e
  7. # End of lines configured by zsh-newuser-install
  8. # The following lines were added by compinstall
  9. zstyle :compinstall filename '/home/josh/.zshrc'
  10. autoload -Uz compinit
  11. compinit
  12. # End of lines added by compinstall
  13. # List of word delimeters
  14. WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
  15. # Use prompt colors (green for regular user, red for root)
  16. autoload -U colors && colors
  17. if [ "$(id -u)" != "0" ]; then
  18. PROMPT="%{$fg_bold[green]%}%n@%m %1~ $%{$reset_color%} "
  19. RPROMPT="[%{$fg_no_bold[yellow]%}%?%{$reset_color%}]"
  20. else
  21. PROMPT="%{$fg_bold[red]%}%n@%m %1~ #%{$reset_color%} "
  22. RPROMPT="[%{$fg_no_bold[yellow]%}%?%{$reset_color%}]"
  23. fi
  24. # ls pleasantness
  25. alias l='\ls --color=auto'
  26. alias ls='ls --color=auto'
  27. alias lsa='ls -a --color=auto'
  28. alias lls='ls -alh --color=auto'
  29. # apt-get aliases
  30. alias update='sudo apt-get update && sudo apt-get dist-upgrade'
  31. alias clean='sudo apt-get clean'
  32. # grep the entirety of the history
  33. alias hg='history 1 | grep'
  34. # Use vim as the default text editor
  35. export VISUAL=vim
  36. # Used to keep steam from throwing errors
  37. export SWT_GTK3=0
  38. # Home and End keysjump the the beginning/end of the command
  39. bindkey "^[OH" beginning-of-line
  40. bindkey "^[OF" end-of-line
  41. # Ctrl-Left and Ctrl-Right keys move between words
  42. bindkey ";5C" forward-word
  43. # bindkey "^[[C" forward-word
  44. bindkey ";5D" backward-word
  45. # bindkey "^[[D" backward-word
  46. # Used for X forwarding in Cygwin
  47. if [[ "$(uname -o)" != "GNU/Linux" ]]; then
  48. DISPLAY=:1.0
  49. fi
  50. # local folder in PATH for UE4
  51. export PATH=$HOME/bin:$PATH
  52. # Flags used for CS243 "Mechanics of Programming"
  53. alias gcc='gcc -std=c99 -Wall -ggdb -Wextra -pedantic'
  54. # devkitPro/devkitPPC sources
  55. export DEVKITPRO=/home/josh/devkitPro/
  56. export DEVKITPPC=/home/josh/devkitPro//devkitPPC
  57. # alias for vim muscle memory when quitting
  58. alias :q='exit'
  59. # eval used by thefuck
  60. if hash fuck 2>/dev/null; then
  61. eval $(thefuck --alias)
  62. fi
  63. # Instantly write history
  64. setopt -o sharehistory
  65. # Ignore duplicates in history
  66. setopt HIST_IGNORE_DUPS
  67. # timestamp alias for dates
  68. alias ts='date +%y-%m-%d'
  69. # zsh-syntax-highlighting (MUST BE AT THE BOTTOM OF THIS FILE)
  70. source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh