zshrc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. # Use prompt colors (green for regular user, red for root)
  14. autoload -U colors && colors
  15. if [ "$(id -u)" != "0" ]; then
  16. PROMPT="%{$fg_bold[green]%}%n@%m %1~ $%{$reset_color%} "
  17. RPROMPT="[%{$fg_no_bold[yellow]%}%?%{$reset_color%}]"
  18. else
  19. PROMPT="%{$fg_bold[red]%}%n@%m %1~ #%{$reset_color%} "
  20. RPROMPT="[%{$fg_no_bold[yellow]%}%?%{$reset_color%}]"
  21. fi
  22. # ls pleasantness
  23. alias l='\ls --color=auto'
  24. alias ls='ls --color=auto'
  25. alias lsa='ls -a --color=auto'
  26. alias lls='ls -alh --color=auto'
  27. # apt-get aliases
  28. alias update='sudo apt-get update && sudo apt-get dist-upgrade'
  29. alias clean='sudo apt-get clean'
  30. # grep the entirety of the history
  31. alias hg='history 1 | grep'
  32. # Use vim as the default text editor
  33. export VISUAL=vim
  34. # Used to keep steam from throwing errors
  35. export SWT_GTK3=0
  36. # Home and End keysjump the the beginning/end of the command
  37. bindkey "^[OH" beginning-of-line
  38. bindkey "^[OF" end-of-line
  39. # Ctrl-Left and Ctrl-Right keys move between words
  40. bindkey ";5C" forward-word
  41. # bindkey "^[[C" forward-word
  42. bindkey ";5D" backward-word
  43. # bindkey "^[[D" backward-word
  44. # bind UP and DOWN arrow keys
  45. bindkey '^[[A' history-substring-search-up
  46. bindkey '^[[B' history-substring-search-down
  47. # Used for X forwarding in Cygwin
  48. if [[ "$(uname -o)" != "GNU/Linux" ]]; then
  49. DISPLAY=:1.0
  50. fi
  51. # local folder in PATH for UE4
  52. export PATH=$HOME/bin:$PATH
  53. # Flags used for CS243 "Mechanics of Programming"
  54. alias gcc='gcc -std=c99 -Wall -ggdb -Wextra -pedantic'
  55. # devkitPro/devkitPPC sources
  56. export DEVKITPRO=/home/josh/devkitPro/
  57. export DEVKITPPC=/home/josh/devkitPro//devkitPPC
  58. # alias for vim muscle memory when quitting
  59. alias :q='exit'
  60. # eval used by thefuck
  61. if hash fuck 2>/dev/null; then
  62. eval $(thefuck --alias)
  63. fi
  64. # Instantly write history
  65. setopt -o sharehistory
  66. # Ignore duplicates in history
  67. setopt HIST_IGNORE_DUPS
  68. # zsh-syntax-highlighting (MUST BE AT THE BOTTOM OF THIS FILE)
  69. source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh