diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-01-02 16:21:27 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-01-02 16:21:27 +0100 |
| commit | a599969f7a9276776931875532c90af881f2a292 (patch) | |
| tree | d96086dbee21dd2e15b4c910363fc8b78f601568 /zsh/zshrc | |
| parent | 46d361f88dfbc43f82295f61159f7870d4acc48b (diff) | |
| download | dotfiles-a599969f7a9276776931875532c90af881f2a292.tar.gz dotfiles-a599969f7a9276776931875532c90af881f2a292.tar.bz2 dotfiles-a599969f7a9276776931875532c90af881f2a292.zip | |
erster entwurf für eine neue zsh Konfiguration
Diffstat (limited to 'zsh/zshrc')
| -rw-r--r-- | zsh/zshrc | 43 |
1 files changed, 36 insertions, 7 deletions
| @@ -1,5 +1,4 @@ | |||
| 1 | # Aliase | 1 | # vim: filetype=zsh |
| 2 | source $XDG_CONFIG_HOME/zsh/aliases | ||
| 3 | 2 | ||
| 4 | # Optionen | 3 | # Optionen |
| 5 | setopt AUTO_PARAM_SLASH | 4 | setopt AUTO_PARAM_SLASH |
| @@ -8,15 +7,11 @@ setopt HIST_SAVE_NO_DUPS | |||
| 8 | 7 | ||
| 9 | [[ ! -r /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] || source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | 8 | [[ ! -r /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] || source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
| 10 | [[ ! -r /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] || source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh | 9 | [[ ! -r /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] || source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
| 11 | [[ ! -r ~/.opam/opam-init/init.zsh ]] || source ~/.opam/opam-init/init.zsh | 10 | [[ ! -r "$HOME/.opam/opam-init/init.zsh" ]] || source "$HOME/.opam/opam-init/init.zsh" |
| 12 | 11 | ||
| 13 | bindkey -v | 12 | bindkey -v |
| 14 | export KEYTIMEOUT=1 | 13 | export KEYTIMEOUT=1 |
| 15 | 14 | ||
| 16 | fpath=($XDG_CONFIG_HOME/zsh $fpath) | ||
| 17 | autoload -Uz prompt; prompt | ||
| 18 | autoload -Uz completion; completion | ||
| 19 | |||
| 20 | # Keybindings | 15 | # Keybindings |
| 21 | zmodload zsh/complist | 16 | zmodload zsh/complist |
| 22 | bindkey -M menuselect 'h' vi-backward-char | 17 | bindkey -M menuselect 'h' vi-backward-char |
| @@ -36,3 +31,37 @@ bindkey -M visual S add-surround | |||
| 36 | bindkey '^A' vi-beginning-of-line | 31 | bindkey '^A' vi-beginning-of-line |
| 37 | bindkey '^E' vi-end-of-line | 32 | bindkey '^E' vi-end-of-line |
| 38 | 33 | ||
| 34 | # Aliase | ||
| 35 | alias mc='mc -u' | ||
| 36 | alias gdb='gdb -q' | ||
| 37 | alias pwgen='pwgen -s 48 1' | ||
| 38 | |||
| 39 | # Command completion | ||
| 40 | autoload -U compinit; compinit | ||
| 41 | _comp_options+=(globdots) # With hidden files | ||
| 42 | |||
| 43 | zstyle ':completion:*' completer _extensions _complete _approximate | ||
| 44 | |||
| 45 | zstyle ':completion:*' menu select | ||
| 46 | |||
| 47 | zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' | ||
| 48 | zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f' | ||
| 49 | zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f' | ||
| 50 | zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f' | ||
| 51 | zstyle ':completion:*' group-name '' | ||
| 52 | |||
| 53 | # Prompt | ||
| 54 | autoload -Uz vcs_info | ||
| 55 | precmd_vcs_info() { vcs_info } | ||
| 56 | precmd_functions+=( precmd_vcs_info ) | ||
| 57 | setopt prompt_subst | ||
| 58 | |||
| 59 | RPROMPT=\$vcs_info_msg_0_ | ||
| 60 | PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b ' | ||
| 61 | |||
| 62 | zstyle ':vcs_info:*' unstagedstr ' *' | ||
| 63 | zstyle ':vcs_info:*' stagedstr ' +' | ||
| 64 | zstyle ':vcs_info:*' check-for-changes true | ||
| 65 | zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%a%u%c%F{3}|%F{1}%a%F{5}]%f' | ||
| 66 | zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f' | ||
| 67 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' | ||
