-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
70 lines (56 loc) · 2.26 KB
/
.zshrc
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
## ~/.zshrc
# History
HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/shell/history"
HISTSIZE=1000000
SAVEHIST="$HISTSIZE"
# Shell options
setopt autocd ## auto cd into dir without 'cd'
setopt append_history ## append history to histfile
setopt histignorespace ## ignore spaced histroy
setopt completeinword
setopt interactivecomments ## treat # as comment on interactive shell
setopt histignorealldups
unsetopt beep ## don't beep
bindkey -e ## emacs style keybindings
bindkey '^[OH' beginning-of-line ## ^A beginning of line
bindkey '^[OF' end-of-line ## ^E end of line
bindkey "\e[1;5D" backward-word ## ^<- one word back
bindkey "\e[1;5C" forward-word ## $-> one word forward
bindkey "^r" history-incremental-search-backward ## ^r histroy search
bindkey "^?" backward-delete-char ## ^? delete character backwords
bindkey "\e[3~" delete-char ## del delete character
# Completion
zstyle :compinstall filename '/home/mubashir/.zshrc'
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' ## match case insensitively
zstyle ':completion:*' verbose true
zstyle ':completion:*' menu select ## menu selection based completion
zstyle ':completion:*' list-colors '' ## completion color
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" ## completion color same as ls
autoload -U colors && colors
autoload -Uz compinit
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/zsh"
compinit -d "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompdump" ## move .zcompdump
_comp_options+=(globdots) ## include dot files in completion
# Prompt Customization
PROMPT='%F{cyan}%n%f@%F{green}%m%f %F{blue}%B%~%b%f %# '
RPROMPT='[%F{yellow}%?%f]'
# Plugins sourced
# extra/pkgfile
source /usr/share/doc/pkgfile/command-not-found.zsh
# aur/zsh-fast-syntax-highlighting
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
# community/zsh-autosuggestions
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# community/grc
source /etc/grc.zsh
# aur/zsh-vi-mode
#source /usr/share/zsh/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
case $TERM in
xterm*)
precmd () {print -Pn "\e]0;%~\a"}
;;
esac
# source aliasrc for aliases
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
# source funtionrc for functions
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/functionrc"