Skip to content

Instantly share code, notes, and snippets.

@eropple
Created April 5, 2016 17:59
Show Gist options
  • Save eropple/544ae402370a25a7d35d4c80508591a1 to your computer and use it in GitHub Desktop.
Save eropple/544ae402370a25a7d35d4c80508591a1 to your computer and use it in GitHub Desktop.
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='mvim' # change this to your windowed editor of choice
fi
bindkey '^[[3' delete-char # delete
bindkey '^[[H' beginning-of-line # home
bindkey '^[[F' end-of-line # end
bindkey '\e[3~' delete-char # delete
bindkey '\eOH' beginning-of-line # home
bindkey '\e[1~' beginning-of-line # home (some terms)
bindkey '\eOF' end-of-line # end
bindkey '\e[4~' end-of-line # end (some terms)
bindkey '\e[1;5D' backward-word # ctrl-left
bindkey '\e[1;5C' forward-word # ctrl-right
bindkey '\e[1;3D' backward-word # alt-left
bindkey '\e[1;3C' forward-word #alt-right
bindkey '^@' history-incremental-search-backward # ctrl-space
bindkey '^[ ' history-beginning-search-backward # ctrl-alt-space
# menu completion
zstyle ':completion:*' menu select
# forces >! and >>!
unsetopt clobber
# extended, prettier history
setopt extended_history
setopt inc_append_history
setopt hist_ignore_dups
setopt hist_expire_dups_first
# automatically appends directories to the pushd/popd list
setopt auto_pushd
DIRSTACKSIZE=500
alias dc='popd > /dev/null' # cd to change, dc to go back. \o/
setopt complete_in_word # Not just at the end
setopt always_to_end # When complete from middle, move cursor
setopt hist_verify # When using ! cmds, confirm first
setopt interactive_comments # Escape commands so I can use them later
setopt print_exit_value # Alert me if something's failed
(( ${+QT_XFT} )) || export QT_XFT=1
(( ${+GDK_USE_XFT} )) || export GDK_USE_XFT=1
# most bash configs have this by default
alias ls='ls --color=auto'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment