summaryrefslogtreecommitdiffstats
path: root/.zshrc
blob: 65dfbc4cd1f91b6b046caaa9699776ebaa7b23bb (plain) (blame)
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
# antibody bundle < ~/.zsh_plugins.txt > ~/.zsh_plugins.sh
export PATH="$PATH:$HOME/bin"
autoload -Uz compinit

typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
if [ $(date +'%j') != $updated_at ]; then
  compinit -i
else
  compinit -C -i
fi

zmodload -i zsh/complist

HISTFILE=$HOME/.zsh_history
HISTSIZE=100000
SAVEHIST=$HISTSIZE

EDITOR=vim
bindkey -e # force emacs mode

setopt hist_ignore_all_dups   # remove older duplicate entries from history
setopt hist_reduce_blanks     # remove superfluous blanks from history items
setopt inc_append_history     # save history entries as soon as they are entered
setopt share_history          # share history between different instances of the shell
setopt auto_cd                # cd by typing directory name if it's not a command
setopt auto_list              # automatically list choices on ambiguous completion
setopt auto_menu              # automatically use menu completion
setopt always_to_end          # move cursor to end if word had one match

# nvm
export NVM_LAZY_LOAD=true

# fzf
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_CTRL_T_OPTS="--preview 'bat --color=always --style=numbers --line-range=:500 {}'"
[ -f /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh
[ -f /usr/share/fzf/completion.zsh ] && source /usr/share/fzf/completion.zsh

export GPG_TTY=$(tty)

export TERM=xterm-256color


alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'

eval "$(starship init zsh)"

[ -f $HOME/.zshrc.local ] && source $HOME/.zshrc.local

source ~/.zsh_plugins.sh