# Skip all this for non-interactive shells [[ -z "$PS1" ]] && return # Use Vim keybindings bindkey -v # Custom keybindings (movement) # normal terminal bindkey "\e[7~" beginning-of-line bindkey "\e[8~" end-of-line bindkey "\e[5~" history-search-backward bindkey "\e[6~" history-search-forward bindkey "\e[3~" delete-char bindkey "\e[2~" quoted-insert bindkey "\eOc" forward-word bindkey "\eOd" backward-word # tmux bindkey "\e[1~" beginning-of-line bindkey "\e[4~" end-of-line bindkey "\eOC" forward-word bindkey "\eOD" backward-word bindkey "^P" push-input bindkey "^R" history-incremental-search-backward # Setup history HISTFILE=~/.histfile HISTSIZE=10000 SAVEHIST=10000 # Options setopt inc_append_history setopt share_history setopt hist_ignore_all_dups setopt hist_ignore_dups setopt appendhistory setopt autocd setopt autopushd setopt pushdminus setopt extendedglob setopt nomatch setopt notify setopt complete_in_word # Tab-Completion zstyle ':completion:*' list-colors ${(s.:.)LSCOLORS} zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' menu select=1 zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle ':completion:*' use-compctl false zstyle ':completion:*' verbose true # Only show local files in the completion, no gopher://, cdda:// etc. zstyle ':completion:*:*:mplayer:*' tag-order files autoload -Uz compinit compinit # Enable color support of ls if [[ "$TERM" != "dumb" ]]; then if [[ -x `which dircolors` ]]; then eval `dircolors -b` alias 'ls=ls --color=auto' fi fi # Set prompt PS1=$'%(!.%{\e[01;32m%}.%{\e[01;31m%})%(?..%? )%(!.%{\e[01;31m%}.%{\e[01;32m%})%n@%m%{\e[01;34m%} %~ %{\e[00m%}%(!.#.$) '