[spacemacs,vim] delete vestigial spacemacs and vim configs
[~bandali/configs] / zsh / .zshrc
1 # Bash-like navigation
2 #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
3 #export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4 export WORDCHARS='*?[]~=&;!#$%^(){}<>'
5 #ZLE_SPACE_SUFFIX_CHARS=$'|&'
6
7 #disable -r time # disable shell reserved word
8 #alias time='time -p' # -p for POSIX output
9
10 # rehash if last command was pacaur or pacman
11 # (so that zsh picks up changes in $PATH immediately)
12 TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
13
14 #
15 # User configuration sourced by interactive shells
16 #
17
18 # Change default zim location
19 export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
20
21 # Start zim
22 [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
23
24 ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
25 #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
26
27 setopt globdots
28
29 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
30 source ~/.zsh/zsh-autopair/autopair.zsh
31
32
33 ### fzf ###
34
35 source /usr/share/fzf/key-bindings.zsh
36 source /usr/share/fzf/completion.zsh
37
38 # Accept history selection instead of putting it on
39 # the command line
40 fzf-history-widget-accept() {
41 fzf-history-widget
42 zle accept-line
43 }
44 #zle -N fzf-history-widget-accept
45 #bindkey '^R' fzf-history-widget-accept
46
47 # alt+c preview
48 export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
49
50 ### fzf ###
51
52
53 # aliases
54 alias mpv="mpv --ytdl-format mp4"
55 alias mv="mv -iv"
56 alias cp="cp -iv"
57 alias scl=systemctl
58 alias jcl=journalctl
59 alias m="mbsync -Va; getmail; notmuch new"
60 alias best="youtube-dl -f best"
61 alias ace="mosh amin@ace.aminb.org"
62 alias nix="ssh amin@aminb.org"
63
64 aur() {
65 cd ~/usr/build
66 git clone https://aur.archlinux.org/${1}.git
67 cd ${1}
68 }
69
70 # i-beam cursor
71 echo -e "\033[5 q"
72 #echo -e "\033[6 q"