all repos — dotfiles @ 4d217414127f7d4ff4256682a1087d86d68871bd

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=$HOME/bin:$PATH
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
23#colors
24zstyle ':completion:*' list-colors "di=34"
25zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
26export ZLE_REMOVE_SUFFIX_CHARS=''
27setopt extended_glob
28setopt autocd
29
30# partial history matching
31zle -N history-beginning-search-backward-end history-search-end
32zle -N history-beginning-search-forward-end history-search-end
33bindkey "^[[A" history-beginning-search-backward-end
34bindkey "^[[B" history-beginning-search-forward-end
35
36# command history
37[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
38HISTSIZE=50000
39SAVEHIST=10000
40
41setopt extended_history
42setopt hist_expire_dups_first
43setopt hist_ignore_dups
44setopt hist_ignore_space
45setopt hist_verify
46setopt inc_append_history
47setopt share_history
48
49# prompt
50_nicy_prompt() {
51	PROMPT="$(~/dotfiles/zsh/prompt)"
52}
53add-zsh-hook precmd _nicy_prompt
54
55[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
56
57# base16-shell 
58#BASE16_SHELL="$HOME/.config/base16-shell/"
59#[ -n "$PS1" ] && \
60#    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
61#        eval "$("$BASE16_SHELL/profile_helper.sh")"
62
63# fpath
64#fpath=($HOME/.zsh/zsh-completions/src $fpath)
65
66# sourced scripts
67source $HOME/.aliases
68source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
69source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
70
71# autojump
72[[ -s /home/icy/.autojump/etc/profile.d/autojump.sh ]] && source /home/icy/.autojump/etc/profile.d/autojump.sh
73autoload -U compinit && compinit -u
74
75# fff
76f() {
77    fff "$@"
78    cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/.fff_d")"
79}
80
81# emacsy binds
82bindkey -e
83# end and home keys
84bindkey "^[[1~" beginning-of-line
85bindkey "^[[4~" end-of-line
86