diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index 88c48d0..9372f8f 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -19,21 +19,47 @@ compinit # History -export HISTFILE=~/.zsh_history -export HISTSIZE=10000 -export SAVEHIST=10000 +HISTFILE=~/.zsh_history +HISTSIZE=10000 +SAVEHIST=10000 setopt SHARE_HISTORY +setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_ALL_DUPS setopt APPEND_HISTORY +setopt HIST_REDUCE_BLANKS +setopt HIST_IGNORE_SPACE +setopt HIST_NO_STORE setopt COMPLETE_ALIASES +# color code completion +zstyle ':completion:*' list-colors "=(#b) #([0-9]#)*=36=31" + # Vi mode bindkey -v zle -N zle-line-init zle -N zle-keymap-select +# Ensure that arrow keys work as they should +bindkey '\e[A' up-line-or-history +bindkey '\e[B' down-line-or-history + +bindkey '\eOA' up-line-or-history +bindkey '\eOB' down-line-or-history + +bindkey '\e[C' forward-char +bindkey '\e[D' backward-char + +bindkey '\eOC' forward-char +bindkey '\eOD' backward-char + +# Rebind the insert key. +bindkey '\e[2~' overwrite-mode + +# Rebind the delete key. +bindkey '\e[3~' delete-char + # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"