aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/aliases5
-rw-r--r--zsh/completion16
-rw-r--r--zsh/prompt17
-rw-r--r--zsh/zprofile3
-rw-r--r--zsh/zshenv9
-rw-r--r--zsh/zshenv.home7
-rw-r--r--zsh/zshrc43
7 files changed, 49 insertions, 51 deletions
diff --git a/zsh/aliases b/zsh/aliases
deleted file mode 100644
index 7d56736..0000000
--- a/zsh/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
1# vim: filetype=zsh
2
3alias mc='mc -u'
4alias gdb='gdb -q'
5alias pwgen='pwgen -s 48 1'
diff --git a/zsh/completion b/zsh/completion
deleted file mode 100644
index ce676bb..0000000
--- a/zsh/completion
+++ /dev/null
@@ -1,16 +0,0 @@
1# vim: filetype=zsh
2
3# Command completion
4autoload -U compinit; compinit
5_comp_options+=(globdots) # With hidden files
6
7zstyle ':completion:*' completer _extensions _complete _approximate
8
9zstyle ':completion:*' menu select
10
11zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
12zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
13zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f'
14zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f'
15zstyle ':completion:*' group-name ''
16
diff --git a/zsh/prompt b/zsh/prompt
deleted file mode 100644
index f567bbe..0000000
--- a/zsh/prompt
+++ /dev/null
@@ -1,17 +0,0 @@
1# vim: filetype=zsh
2
3autoload -Uz vcs_info
4precmd_vcs_info() { vcs_info }
5precmd_functions+=( precmd_vcs_info )
6setopt prompt_subst
7
8RPROMPT=\$vcs_info_msg_0_
9PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b '
10
11zstyle ':vcs_info:*' unstagedstr ' *'
12zstyle ':vcs_info:*' stagedstr ' +'
13zstyle ':vcs_info:*' check-for-changes true
14zstyle ':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'
15zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f'
16zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
17
diff --git a/zsh/zprofile b/zsh/zprofile
new file mode 100644
index 0000000..34d71c1
--- /dev/null
+++ b/zsh/zprofile
@@ -0,0 +1,3 @@
1# vim: filetype=zsh
2
3[[ -d "${HISTFILE:h}" ]] || mkdir -p "${HISTFILE:h}"
diff --git a/zsh/zshenv b/zsh/zshenv
index 460d03e..34c81a1 100644
--- a/zsh/zshenv
+++ b/zsh/zshenv
@@ -1,15 +1,11 @@
1export XDG_CONFIG_HOME="$HOME/.config" 1# vim: filetype=zsh
2export XDG_DATA_HOME="$HOME/.local/share"
3export XDG_CACHE_HOME="$HOME/.cache"
4 2
5export EDITOR="nvim" 3export EDITOR="nvim"
6export VISUAL="nvim" 4export VISUAL="nvim"
7 5
8export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
9
10export HISTFILE="$XDG_DATA_HOME/zsh/history"
11export HISTSIZE=10000 6export HISTSIZE=10000
12export SAVEHIST=10000 7export SAVEHIST=10000
8export HISTFILE="$XDG_DATA_HOME/zsh/history"
13 9
14HOME_LOCAL="$HOME/.local/bin" 10HOME_LOCAL="$HOME/.local/bin"
15HOME_CARGO="$HOME/.cargo/bin" 11HOME_CARGO="$HOME/.cargo/bin"
@@ -20,6 +16,7 @@ export MANPATH="${MANPATH-$(manpath)}:$NPM_PACKAGES/share/man:$HOME/.local/texli
20export INFOPATH="$INFOPATH:$HOME/.local/texlive/texmf-dist/info" 16export INFOPATH="$INFOPATH:$HOME/.local/texlive/texmf-dist/info"
21 17
22# Fix Midnight Commander ESC Taste 18# Fix Midnight Commander ESC Taste
19# zusätzlich noch unter "F9 -> Optionen -> Konfiguration -> Escape Tastenmodus -> [x] Einzelner Tastendruck" aktivieren
23export KEYBOARD_KEY_TIMEOUT_US=1000 20export KEYBOARD_KEY_TIMEOUT_US=1000
24 21
25# Tmuxp 22# Tmuxp
diff --git a/zsh/zshenv.home b/zsh/zshenv.home
new file mode 100644
index 0000000..47f9687
--- /dev/null
+++ b/zsh/zshenv.home
@@ -0,0 +1,7 @@
1# vim: filetype=zsh
2
3export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
4export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
5export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
6
7export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
diff --git a/zsh/zshrc b/zsh/zshrc
index 036b90a..7845c40 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -1,5 +1,4 @@
1# Aliase 1# vim: filetype=zsh
2source $XDG_CONFIG_HOME/zsh/aliases
3 2
4# Optionen 3# Optionen
5setopt AUTO_PARAM_SLASH 4setopt 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
13bindkey -v 12bindkey -v
14export KEYTIMEOUT=1 13export KEYTIMEOUT=1
15 14
16fpath=($XDG_CONFIG_HOME/zsh $fpath)
17autoload -Uz prompt; prompt
18autoload -Uz completion; completion
19
20# Keybindings 15# Keybindings
21zmodload zsh/complist 16zmodload zsh/complist
22bindkey -M menuselect 'h' vi-backward-char 17bindkey -M menuselect 'h' vi-backward-char
@@ -36,3 +31,37 @@ bindkey -M visual S add-surround
36bindkey '^A' vi-beginning-of-line 31bindkey '^A' vi-beginning-of-line
37bindkey '^E' vi-end-of-line 32bindkey '^E' vi-end-of-line
38 33
34# Aliase
35alias mc='mc -u'
36alias gdb='gdb -q'
37alias pwgen='pwgen -s 48 1'
38
39# Command completion
40autoload -U compinit; compinit
41_comp_options+=(globdots) # With hidden files
42
43zstyle ':completion:*' completer _extensions _complete _approximate
44
45zstyle ':completion:*' menu select
46
47zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
48zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
49zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f'
50zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f'
51zstyle ':completion:*' group-name ''
52
53# Prompt
54autoload -Uz vcs_info
55precmd_vcs_info() { vcs_info }
56precmd_functions+=( precmd_vcs_info )
57setopt prompt_subst
58
59RPROMPT=\$vcs_info_msg_0_
60PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b '
61
62zstyle ':vcs_info:*' unstagedstr ' *'
63zstyle ':vcs_info:*' stagedstr ' +'
64zstyle ':vcs_info:*' check-for-changes true
65zstyle ':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'
66zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f'
67zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'