From 432524aa4d63bbccac75e25abfb813be0dd5e5fa Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 10 Nov 2012 12:57:14 +0100 Subject: Undo move --- .zshrc | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .zshrc (limited to '.zshrc') diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..1a166e5 --- /dev/null +++ b/.zshrc @@ -0,0 +1,99 @@ +# -*- Mode: shell-script; -*- +# Setup variables +HISTFILE=$ZDOTDIR/histfile +HISTSIZE=1000 +SAVEHIST=1000 +LESSCMD="/usr/bin/less -FXRS" + +export LESS_TERMCAP_mb=$'\e[1;37m' +export LESS_TERMCAP_md=$'\e[1;37m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[1;47;30m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[0;36m' +export PAGER=$LESSCMD + +# Aliases +alias alpine="alpine -p ""{imap.gmail.com/ssl/user=tom.willemsen@archlinux.us}remote_pinerc""" +alias evolus-pencil="/usr/lib/evolus-pencil-svn/evolus-pencil.sh" +alias grep="grep --color=always" +alias less=$LESSCMD +alias ls="ls -F --color=always" +alias mysql="mysql --pager" +alias reboot="systemctl reboot" +alias poweroff="systemctl poweroff" + +setopt notify +# Allow for functions in the prompt +setopt PROMPT_SUBST +setopt EXTENDED_GLOB + +zstyle :compinstall filename '$HOME/.zshrc' + +autoload -Uz compinit +compinit + +# Initialize colors. +autoload -U colors +colors + +# Autoload zsh functions. +fpath=($HOME/.zsh/functions $fpath) +autoload -U $HOME/.zsh/functions/*(:t) + +# Enable auto-execution of functions +typeset -ga preexec_functions +typeset -ga precmd_functions +typeset -ga chpwd_functions + +# Append git functions needed for prompt. +preexec_functions+='preexec_update_vars' +precmd_functions+='precmd_update_git_vars' +precmd_functions+='precmd_update_updates' +chpwd_functions+='chpwd_update_git_vars' + +# Set the prompt. +PROMPT='$(prompt)' +RPROMPT='$(rprompt)' + +# Set terminal name to current running application +case $TERM in + rxvt*) + precmd () { print -Pn "\e]0;%~\a" } + preexec () { print -Pn "\e]0;$1\a" } + ;; +esac + +# Set terminal keys +bindkey "\e[1~" beginning-of-line +bindkey "\e[4~" end-of-line +bindkey "\e[5~" beginning-of-history +bindkey "\e[6~" end-of-history +bindkey "\e[3~" delete-char +bindkey "\e[2~" quoted-insert +bindkey "\e[5C" forward-word +bindkey "\e0c" emacs-forward-word +bindkey "\e[5D" backward-word +bindkey "\e0d" emacs-backward-word +bindkey "\e\e[C" forward-word +bindkey "\e\e[D" backward-word +## for rxvt +bindkey "\e[8~" end-of-line +bindkey "\e[7~" beginning-of-line +## for non RH/Debian xterm, can't hurt for RH/Debian xterm +bindkey "\e0H" beginning-of-line +bindkey "\e0F" end-of-line +## for freebsd console +bindkey "\e[H" beginning-of-line +bindkey "\e[F" end-of-line + +bindkey "^W" backward-delete-char + +# Show syntax highlighting when we're not running in emacs +if [ -z $EMACS ]; then + source $HOME/.zsh/syntax-highlighting/zsh-syntax-highlighting.zsh + + ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=blue' + ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=blue' +fi -- cgit v1.2.3-54-g00ecf