2ck

.zshrc

2ck
Apr 5th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.71 KB | None | 0 0
  1. # The following lines were added by compinstall
  2.  
  3. zstyle ':completion:*' completer _expand _complete _ignored _approximate
  4. zstyle ':completion:*' expand prefix suffix
  5. zstyle ':completion:*' format 'Completing %d'
  6. zstyle ':completion:*' group-name ''
  7. zstyle ':completion:*' insert-unambiguous true
  8. zstyle ':completion:*' max-errors 1
  9. zstyle ':completion:*' original true
  10.  
  11. autoload -Uz compinit
  12. compinit
  13. # End of lines added by compinstall
  14. # Lines configured by zsh-newuser-install
  15. HISTFILE=~/.histfile
  16. HISTSIZE=200
  17. SAVEHIST=150
  18. setopt autocd extendedglob notify nohup
  19. unsetopt appendhistory beep
  20. bindkey -e
  21. # End of lines configured by zsh-newuser-install
  22.  
  23. # autoload -U promptinit
  24. autoload zkbd
  25. autoload -Uz vcs_info
  26. autoload promptinit
  27. autoload compinit
  28. setopt auto_resume
  29. setopt AUTO_PUSHD
  30.  
  31. promptinit
  32. compinit
  33.  
  34. precmd()
  35. {
  36.     PR_FILLBAR=""
  37.     PR_PWDLEN=""
  38.     local TERMWIDTH
  39.     (( TERMWIDTH = ${COLUMNS} - 1 ))
  40. #
  41.     local promptsize=${#${(%):-(%n@%M)(zsh:%L:screen/$WINDOW)()}}
  42.     local pwdsize=${#${(%):-%~}}
  43. #
  44.     if [[ "$promptsize + $pwdsize" -gt $TERMWIDTH ]]; then
  45.         ((PR_PWDLEN=$TERMWIDTH - $promptsize))
  46.     else
  47.         PR_FILLBAR="${(l.(($TERMWIDTH - ($promptsize + $pwdsize)))..-.)}"
  48.     fi
  49. #    print $promptsize
  50. #    print $pwdsize
  51. #   if [-n "$STY"]; then
  52.     jobs
  53.     case $TERM in
  54.     xterm*)
  55.         print -nP "\e]0;%y: %1~: --\a"
  56.     ;;
  57.     esac
  58. }
  59. preexec()
  60. {
  61.     case $TERM in
  62.     xterm*)
  63.         print -nP "\e]0;%y: %1~: $(echo $1 | grep -o '^[^ ]*')\a"
  64.     ;;
  65.     esac
  66. }
  67. [[ ! -f ${ZDOTDIR:-$HOME}/.zkbd/xterm-:0.0 ]] && zkbd
  68. source ${ZDOTDIR:-$HOME}/.zkbd/xterm-:0.0
  69.  
  70. [[ -n ${key[Backspace]} ]] && bindkey "${key[Backspace]}" backward-delete-char
  71. [[ -n ${key[Insert]} ]] && bindkey "${key[Insert]}" overwrite-mode
  72. [[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line
  73. [[ -n ${key[PageUp]} ]] && bindkey "${key[PageUp]}" up-line-or-history
  74. [[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char
  75. [[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line
  76. [[ -n ${key[PageDown]} ]] && bindkey "${key[PageDown]}" down-line-or-history
  77. [[ -n ${key[Up]} ]] && bindkey "${key[Up]}" up-line-or-search
  78. [[ -n ${key[Left]} ]] && bindkey "${key[Left]}" backward-char
  79. [[ -n ${key[Down]} ]] && bindkey "${key[Down]}" down-line-or-search
  80. [[ -n ${key[Right]} ]] && bindkey "${key[Right]}" forward-char
  81. bindkey ";5C" forward-word
  82. bindkey ";5D" backward-word
  83.  
  84. alias bc='bc -il ~/.bc/*.bc'
  85. alias cl='clisp -repl ~/.cl/*.cl'
  86.  
  87. # project aliases
  88. # thanks to Ryuzaki (http://dotfiles.org/~Ryuzaki/.zshrc)
  89. # for the "go" idea
  90. while read line; do
  91.     p=( `echo $line | egrep -o -e "[^ ]+"` )
  92.     alias go${p[1]}="cd ${p[2]}"
  93. done < "$HOME/.pro_targets"
Advertisement
Add Comment
Please, Sign In to add comment