-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc.local
48 lines (40 loc) · 1.64 KB
/
.zshrc.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
## Prompt theme extension ##
# Virtualenv support
function virtual_env_prompt () {
REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
}
grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f'
grml_theme_add_token eol $'\n'$'\xE2\x86\x92'' ' '%F{magenta}' '%f'
zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs eol
zstyle ':prompt:grml:right:setup' use-rprompt false
# use the vi navigation keys (hjkl) besides cursor keys in menu completion
bindkey -M menuselect 'h' vi-backward-char # left
bindkey -M menuselect 'k' vi-up-line-or-history # up
bindkey -M menuselect 'l' vi-forward-char # right
bindkey -M menuselect 'j' vi-down-line-or-history # bottom
## set command prediction from history, see 'man 1 zshcontrib'
is4 && zrcautoload predict-on && \
zle -N predict-on && \
zle -N predict-off && \
bindkey "^X^Z" predict-on && \
bindkey "^Z" predict-off
## try to avoid the 'zsh: no matches found...'
setopt nonomatch
setopt noautocd
setopt interactivecomments
## compsys related snippets ##
## changed completer settings
zstyle ':completion:*' completer _complete _correct _approximate
zstyle ':completion:*' expand prefix suffix
# another different completer setting: expand shell aliases
zstyle ':completion:*' completer _expand_alias _complete _approximate
## use a default width of 80 for manpages for more convenient reading
export MANWIDTH=${MANWIDTH:-80}
## vi mode
bindkey -v
export KEYTIMEOUT=0.4
bindkey "^[[7~" beginning-of-line
bindkey "^[[8~" end-of-line
bindkey -M viins 'jk' vi-cmd-mode
source ~/.bash_me
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh