# If not running interactively, don't do anything [[ $- != *i* ]] && return zstyle :compinstall filename '/home/.zshrc' zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' autoload -Uz compinit compinit stty -ixon keymap_file="$HOME/.config/zsh/keymap/$TERM" [[ ! -d "$(dirname "$keymap_file")" ]] && mkdir -p "$(dirname "$keymap_file")" [[ ! -f "$keymap_file" ]] && ~/.config/zsh/init-keymap.zsh "$keymap_file" source "$keymap_file" unset keymap_file [[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line [[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line [[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode [[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char [[ -n "${key[CtrlBackspace]}" ]] && bindkey -- "${key[CtrlBackspace]}" backward-delete-word [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char [[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history [[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history [[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char [[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char [[ -n "${key[CtrlLeft]}" ]] && bindkey -- "${key[CtrlLeft]}" backward-word [[ -n "${key[CtrlRight]}" ]] && bindkey -- "${key[CtrlRight]}" forward-word export EDITOR=micro export PAGER=less alias zm=zmachine alias zmachine="$EDITOR ~/.config/zsh/machine.zsh" alias zshrc="$EDITOR ~/.zshrc" [[ -f ~/.config/zsh/machine.zsh ]] && source ~/.config/zsh/machine.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source <(starship init zsh)