Skip to content

Instantly share code, notes, and snippets.

@sph432
Created March 15, 2016 11:00
Show Gist options
  • Select an option

  • Save sph432/54f621aa6cf68bc6781a to your computer and use it in GitHub Desktop.

Select an option

Save sph432/54f621aa6cf68bc6781a to your computer and use it in GitHub Desktop.
HISTSIZE=8192
SAVEHIST=8192
REPORTTIME=30
setopt autocd extendedglob notify completealiases HIST_IGNORE_DUPS
bindkey -v
# End of lines configured by zsh-newuser-install
# compinstall magic
zstyle ':completion:*' completer _list _expand _complete _ignored _approximate
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' file-sort name
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-uambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' menu select
zstyle ':completion:*' original true
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' prompt '%e'
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion:*' verbose true
zstyle :compinstall filename "$XDG_CONFIG_HOME/zsh/.zshrc"
autoload -Uz compinit && compinit
# end of compinstall magic
autoload zkbd
function getZkbdConf() {
[[ -f ${ZDOTDIR}/.zkbd/${TERM}-${VENDOR}-${OSTYPE} ]] && printf '%s' ${ZDOTDIR}/".zkbd/${TERM}-${VENDOR}-${OSTYPE}" && return 0
[[ -f ${ZDOTDIR}/.zkbd/${TERM}-${DISPLAY} ]] && printf '%s' ${ZDOTDIR}/".zkbd/${TERM}-${DISPLAY}" && return 0
return 1
}
[[ ! -d ~/.zkbd ]] && mkdir ~/.zkbd
keyfile=$(getZkbdConf)
ret=$?
if [[ ${ret} -ne 0 ]]; then
zkbd
keyfile=$(getZkbdConf)
ret=$?
fi
if [[ ${ret} -eq 0 ]] ; then
source "${keyfile}"
else
printf 'Failed to setup keys using zkbd.\n'
fi
unfunction getZkbdConf; unset keyfile ret
[[ -n ${key[Backspace]} ]] && bindkey "${key[Backspace]}" backward-delete-char
[[ -n ${key[Insert]} ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n ${key[PageUp]} ]] && bindkey "${key[PageUp]}" up-line-or-history
[[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char
[[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line
[[ -n ${key[PageDown]} ]] && bindkey "${key[PageDown]}" down-line-or-history
[[ -n ${key[Up]} ]] && bindkey "${key[Up]}" up-line-or-search
[[ -n ${key[Left]} ]] && bindkey "${key[Left]}" backward-char
[[ -n ${key[Down]} ]] && bindkey "${key[Down]}" down-line-or-search
[[ -n ${key[Right]} ]] && bindkey "${key[Right]}" forward-char
if [ -f ~/.config/aliases ]
then
source ~/.config/aliases
fi
source /usr/share/zsh-dwim/init.zsh
source /usr/share/doc/pkgfile/command-not-found.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment