all repos — dotfiles @ dac6d3a735bdb6f28e3a1c5989ee41aa6a2e4b1c

my *nix dotfiles

zsh/.zshrc (view raw)

 1#               __             
 2#   ____  _____/ /_  __________
 3#  /_  / / ___/ __ \/ ___/ ___/
 4# _ / /_(__  ) / / / /  / /__  
 5#(_)___/____/_/ /_/_/   \___/  
 6#
 7
 8# export thingys
 9export ZSH=/home/$USER/.oh-my-zsh
10export BROWSER=/usr/bin/firefox
11export EDITOR=/usr/bin/nvim
12export SSH_KEY_PATH="~/.ssh/id_rsa"
13export PATH=$PATH:$HOME/bin
14export GPG_TTY=$(tty)
15export INPUTRC=~/.inputrc
16export PATH=$PATH:$HOME/Leet/Nim/bin
17export PATH=$PATH:$HOME/.nimble/bin
18export PATH=$PATH:$HOME/.local/bin
19export PATH=$PATH:/usr/local/go/bin
20
21# zsh setup
22autoload -Uz compinit colors add-zsh-hook history-search-end
23colors
24compinit
25zstyle ':completion:*' list-colors "di=34"
26zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
27export ZLE_REMOVE_SUFFIX_CHARS=''
28setopt extended_glob
29setopt autocd
30
31# partial history matching
32zle -N history-beginning-search-backward-end history-search-end
33zle -N history-beginning-search-forward-end history-search-end
34bindkey "^[[A" history-beginning-search-backward-end
35bindkey "^[[B" history-beginning-search-forward-end
36
37# command history
38[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
39HISTSIZE=50000
40SAVEHIST=10000
41
42setopt extended_history
43setopt hist_expire_dups_first
44setopt hist_ignore_dups
45setopt hist_ignore_space
46setopt hist_verify
47setopt inc_append_history
48setopt share_history
49
50# prompt
51_nicy_prompt() {
52	PROMPT="$(~/dotfiles/zsh/prompt)"
53}
54add-zsh-hook precmd _nicy_prompt
55
56# end and home keys
57bindkey "^[[1~" beginning-of-line
58bindkey "^[[4~" end-of-line
59
60[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
61
62# base16-shell 
63BASE16_SHELL="$HOME/.config/base16-shell/"
64[ -n "$PS1" ] && \
65    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
66        eval "$("$BASE16_SHELL/profile_helper.sh")"
67
68# fpath
69fpath=($HOME/.zsh/zsh-completions/src $fpath)
70
71# sourced scripts
72source /usr/share/autojump/autojump.zsh
73source $HOME/.aliases
74source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
75source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
76source $HOME/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh
77
78# emacsy binds
79bindkey -e