diff options
| author | Thomas Schmucker <ts@its1.de> | 2023-05-27 10:10:55 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2023-05-27 10:10:55 +0200 |
| commit | 38aca8584286842dd99dc8f28e3d44a4c743d3bc (patch) | |
| tree | 672d18664108e677343e0ef257ca1f8362d7777e /zsh | |
| parent | ea20114f0842e9995e5bd8fa01c88c8f6516b80d (diff) | |
| download | dotfiles-38aca8584286842dd99dc8f28e3d44a4c743d3bc.tar.gz dotfiles-38aca8584286842dd99dc8f28e3d44a4c743d3bc.tar.bz2 dotfiles-38aca8584286842dd99dc8f28e3d44a4c743d3bc.zip | |
Besseres Setup für Auto-Vervollständigung
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/aliases | 2 | ||||
| -rw-r--r-- | zsh/completion | 16 | ||||
| -rw-r--r-- | zsh/prompt | 2 | ||||
| -rw-r--r-- | zsh/zshrc | 13 |
4 files changed, 25 insertions, 8 deletions
diff --git a/zsh/aliases b/zsh/aliases index b9a1866..ebeafdc 100644 --- a/zsh/aliases +++ b/zsh/aliases | |||
| @@ -1,2 +1,4 @@ | |||
| 1 | # vim: filetype=zsh | ||
| 2 | |||
| 1 | alias mc='mc -u' | 3 | alias mc='mc -u' |
| 2 | alias gdb='gdb -q' | 4 | alias gdb='gdb -q' |
diff --git a/zsh/completion b/zsh/completion new file mode 100644 index 0000000..ce676bb --- /dev/null +++ b/zsh/completion | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # vim: filetype=zsh | ||
| 2 | |||
| 3 | # Command completion | ||
| 4 | autoload -U compinit; compinit | ||
| 5 | _comp_options+=(globdots) # With hidden files | ||
| 6 | |||
| 7 | zstyle ':completion:*' completer _extensions _complete _approximate | ||
| 8 | |||
| 9 | zstyle ':completion:*' menu select | ||
| 10 | |||
| 11 | zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' | ||
| 12 | zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f' | ||
| 13 | zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f' | ||
| 14 | zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f' | ||
| 15 | zstyle ':completion:*' group-name '' | ||
| 16 | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | # vim: filetype=zsh | ||
| 2 | |||
| 1 | autoload -Uz vcs_info | 3 | autoload -Uz vcs_info |
| 2 | precmd_vcs_info() { vcs_info } | 4 | precmd_vcs_info() { vcs_info } |
| 3 | precmd_functions+=( precmd_vcs_info ) | 5 | precmd_functions+=( precmd_vcs_info ) |
| @@ -6,21 +6,18 @@ setopt AUTO_PARAM_SLASH | |||
| 6 | unsetopt CASE_GLOB | 6 | unsetopt CASE_GLOB |
| 7 | setopt HIST_SAVE_NO_DUPS | 7 | setopt HIST_SAVE_NO_DUPS |
| 8 | 8 | ||
| 9 | # Command completion | 9 | [[ ! -r /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] || source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
| 10 | autoload -U compinit; compinit | 10 | [[ ! -r /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] || source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
| 11 | _comp_options+=(globdots) # With hidden files | 11 | [[ ! -r ~/.opam/opam-init/init.zsh ]] || source ~/.opam/opam-init/init.zsh |
| 12 | |||
| 13 | zstyle ':completion:*' menu select | ||
| 14 | zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' | ||
| 15 | |||
| 16 | [[ ! -r ~/.opam/opam-init/init.zsh ]] || source ~/.opam/opam-init/init.zsh >/dev/null 2>&1 | ||
| 17 | 12 | ||
| 18 | bindkey -v | 13 | bindkey -v |
| 19 | export KEYTIMEOUT=1 | 14 | export KEYTIMEOUT=1 |
| 20 | 15 | ||
| 21 | fpath=($XDG_CONFIG_HOME/zsh $fpath) | 16 | fpath=($XDG_CONFIG_HOME/zsh $fpath) |
| 22 | autoload -Uz prompt; prompt | 17 | autoload -Uz prompt; prompt |
| 18 | autoload -Uz completion; completion | ||
| 23 | 19 | ||
| 20 | # Keybindings | ||
| 24 | zmodload zsh/complist | 21 | zmodload zsh/complist |
| 25 | bindkey -M menuselect 'h' vi-backward-char | 22 | bindkey -M menuselect 'h' vi-backward-char |
| 26 | bindkey -M menuselect 'k' vi-up-line-or-history | 23 | bindkey -M menuselect 'k' vi-up-line-or-history |
