autoload -Uz compinit autoload colors ; colors autoload -U edit-command-line compinit HISTFILE=~/.histfile HISTSIZE=900000 SAVEHIST=200000 setopt appendhistory nomatch unsetopt autocd beep extendedglob notify # set line editing to vim zle -N edit-command-line bindkey -M vicmd v edit-command-line PS1="$(print '%{\e[1;30m%}[%{\e[1;31m%}%*%{\e[1;30m%}]%{\e[0m%} %{\e[1;30m%}[%{\e[1;31m%}%n%{\e[1;30m%}-%{\e[1;31m%}%m%{\e[1;30m%}]%{\e[1;31m%} %2d %{\e[0m%}')" bindkey -v '^[[3~' delete-char bindkey -v '^[[4~' end-of-line bindkey -v '^[OF' end-of-line bindkey -v '^[[F' end-of-line bindkey -v '^[[1~' beginning-of-line bindkey -v '^[[H' beginning-of-line bindkey -v '^[OH' beginning-of-line bindkey -v '^[[5~' history-beginning-search-backward bindkey -v '^[[6~' history-beginning-search-forward bindkey -v '^K' history-search-backward bindkey -v '^J' history-search-forward bindkey -v '^R' history-incremental-search-backward bindkey -v '^T' history-incremental-search-forward bindkey -v '^[^?' backward-delete-word # environment setup export EDITOR="vim" export PAGER="less -FXR" # load any SSH keys into the agent export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent/agent.sock" keys_loaded="$( ssh-add -l | grep 'has no ident' | wc -l )" if [ "$keys_loaded" -eq "1" ]; then ssh-add fi ssh-add -l