You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/zsh
DEFAULT_USER=marc #für den Promot wird der user ausgeblendet, wenn default erkannt ist
# -------------------------------------- # Environment # --------------------------------------
export EDITOR=nvim export VISUAL=nvim
# -------------------------------------- # Prompt # --------------------------------------
setopt PROMPT_SUBST # erlaubt Funktionen im Prompt
# -------------------------------------- # History # -------------------------------------- HISTFILE=$ZDOTDIR/zhistory setopt APPEND_HISTORY # append hostory instead of overwriting HISTSIZE=1200 # notwendig, damit HIST_EXPIRE_DUPS_FIRST funktioniert SAVEHIST=1000 setopt HIST_EXPIRE_DUPS_FIRST # entfernt erst Duplikate, wenn SAVEHIST überläuft setopt EXTENDED_HISTORY # speichert Zeitstempel und Dauer setopt SHARE_HISTORY # share history across terms
# -------------------------------------- # Keybindings # --------------------------------------
# create a zkbd compatible hash # to add other keys to this hash, see: man 5 terminfo
typeset -A key
key[Home]="$terminfo[khome]" key[End]="$terminfo[kend]" key[Insert]="$terminfo[kich1]" key[Backspace]="$terminfo[kbs]" key[Delete]="$terminfo[kdch1]" key[Up]="$terminfu[kcuu1]" key[Down]="$terminfo[kcud1]" key[Left]="$terminfo[kcub1]" key[Right]="$terminfo[kcuf1]" key[PageUp]="$terminfo[kpp]" key[PageDown]="$terminfo[knp]"
# setup key accordingly [[ -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[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[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history [[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
bindkey "^R" history-incremental-search-backward
# Finally, make sure the terminal is in application mode, when zle is # active. Only then are the values from $erminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then function zle-line-init () { echoti smkx } function zle-line-finish () { echoti rmkx } zle -N zle-line-init zle -N zle-line-finish fi
# -------------------------------------- # Plugins # --------------------------------------
PLUGINS=$ZDOTDIR/plugins/
for plugin in $PLUGINS*.zsh do source $plugin done
# -------------------------------------- # Themes # --------------------------------------
source $ZDOTDIR/themes/agnoster.zsh-theme
|