-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
82 lines (57 loc) · 2.3 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
71
72
73
74
75
76
77
78
79
80
81
82
export EDITOR=nvim
bindkey -e # disable vim mode in terminal
# no control d
set -o ignoreeof
# fix home/end/delete in tmux
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
bindkey "^[[3~" delete-char
bindkey "\e[3~" delete-char
#bindkey "^[b" delete-word
# various aliases
alias vim="nvim"
alias vi="nvim"
alias tmuxl="tmux list-sessions"
alias tml="tmux list-sessions"
alias tm="tmuxa"
alias :q='exit'
alias :Q='exit'
alias ls="ls -h -F -G"
alias la="ls -la"
alias ll="ls -l"
# history fixes
# Avoid duplicates
HISTCONTROL=ignoredups:erasedups
# append to history after each command, and load after each command
setopt SHARE_HISTORY
setopt histignorespace
# macos complains about insecure directories
ZSH_DISABLE_COMPFIX="true"
# tab complete tweaks
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
#zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
# partial completion suggestions
#
zstyle ':completion:*' list-suffixes
zstyle ':completion:*' expand prefix suffix
# option-arrow movement. inclusion makes them included in the "word"
export WORDCHARS="" #"*?_-.[]~=/&;!#$%^(){}<>"
eval "$(/opt/homebrew/bin/brew shellenv)"
# history search with CTRL-R. Paste path with CTRL-T. cd with ALT-C (not in iterm)
eval "$(fzf --zsh)"
# ignore specfic folders
export FZF_DEFAULT_COMMAND='ag -p ~/.gitignore_global -p ~/.fzfignore -g ""'
#export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix'
# prompt
eval "$(starship init zsh)"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This lo
eval "$(rbenv init - $(basename $SHELL))"
export PATH=~/.local/bin/:$PATH
export PATH=~/.git/commands/:$PATH
export PATH=~/.ghcup/bin:$PATH