zshrc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # local zsh config
  2. source ~/.zshrc.local
  3. # load antigen if it exists
  4. if [ -h ~/.antigen.zsh ]
  5. then
  6. source ~/.antigen.zsh
  7. # Load oh-my-zsh's library.
  8. antigen use oh-my-zsh
  9. # Bundles from the default repo (robbyrussell's oh-my-zsh).
  10. antigen bundle git
  11. antigen bundle heroku
  12. antigen bundle pip
  13. antigen bundle lein
  14. antigen bundle command-not-found
  15. # Syntax highlighting bundle.
  16. antigen bundle zsh-users/zsh-syntax-highlighting
  17. # Load the theme.
  18. antigen theme bira
  19. # Tell antigen that you're done.
  20. antigen apply
  21. fi
  22. # History
  23. HISTFILE=~/.histfile
  24. HISTSIZE=10000
  25. SAVEHIST=10000
  26. # Instantly write history
  27. setopt -o sharehistory
  28. # Ignore duplicates in history
  29. setopt HIST_IGNORE_DUPS
  30. # Delete old recorded entry if new entry is a duplicate.
  31. setopt HIST_IGNORE_ALL_DUPS
  32. setopt appendhistory autocd extendedglob nomatch
  33. bindkey -e
  34. zstyle :compinstall filename '/home/josh/.zshrc'
  35. autoload -Uz compinit
  36. compinit -u
  37. # List of word delimeters
  38. WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
  39. # ls pleasantness
  40. alias l='\ls --color=auto'
  41. alias ls='ls --color=auto'
  42. alias la='ls -a --color=auto'
  43. alias lsa='ls -a --color=auto'
  44. alias lls='ls -lh --color=auto'
  45. alias ll='ls -lh --color=auto'
  46. export VISUAL=emacs -nw
  47. # eval used by thefuck
  48. if hash fuck 2>/dev/null; then
  49. eval $(thefuck --alias)
  50. fi
  51. # timestamp alias for dates
  52. alias ts='date +%y-%m-%d'
  53. # alias for getting latest file in a folder
  54. alias latest='ls -t | head -n 1'
  55. # Home and End keys jump the the beginning/end of the command
  56. bindkey "^[OH" beginning-of-line
  57. bindkey "^[[H" beginning-of-line
  58. bindkey "^[OF" end-of-line
  59. bindkey "^[[F" end-of-line
  60. # Enable forward search
  61. bindkey "^s" history-incremental-search-forward
  62. # Vim and vi bindings
  63. # Use vim as the default text editor
  64. # export VISUAL=vim
  65. # Ctrl-Left and Ctrl-Right keys move between words
  66. # bindkey ";5C" forward-word
  67. # bindkey ";5D" backward-word
  68. # alias for vim muscle memory when quitting
  69. #alias :q='exit'
  70. # vi bindings
  71. #bindkey -v
  72. #export KEYTIMEOUT=1
  73. #
  74. #bindkey '^P' up-history
  75. #bindkey '^N' down-history
  76. #bindkey '^?' backward-delete-char
  77. #bindkey '^h' backward-delete-char
  78. #bindkey '^w' backward-kill-word
  79. #bindkey '^r' history-incremental-search-backward
  80. #
  81. #function zle-line-init zle-keymap-select {
  82. # VIM_PROMPT="%{$fg_bold[yellow]%} [% NORMAL]% %{$reset_color%}"
  83. # RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
  84. # zle reset-prompt
  85. #}
  86. #function zle-line-finish {
  87. # VIM_PROMPT=""
  88. # RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
  89. # zle reset-prompt
  90. #}
  91. #RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
  92. #
  93. #zle -N zle-line-init
  94. #zle -N zle-keymap-select