-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
66 lines (57 loc) · 1.79 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
path=("/opt/homebrew/bin" $path)
path=("$HOME/.local/bin" $path)
path=("$HOME/.cargo/bin" $path)
export PATH
#if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
# exec tmux attach
#fi
export EDITOR="nvim"
export BROWSER="chromium"
export EDITOR="nvim"
export FZF_DEFAULT_COMMAND="rg --hidden --files"
export LC_CTYPE="en_US.UTF-8"
export LESS="-R --mouse --wheel-lines=3"
export NVIM_LISTEN_ADDRESS="/tmp/nvimsocket"
export TERMINAL="alacritty"
export NPM_PACKAGES="$HOME/.npm-packages"
if [[ -e "$HOME/.secrets.zsh" ]]; then
source "$HOME/.secrets.zsh"
fi
alias ls="ls --color=auto"
alias l="ls"
alias la="ls -A"
alias ll="ls -Al"
alias sudo="sudo "
alias cheat="cheat --color"
alias ch="cheat"
alias e="$EDITOR"
bindkey -v
bindkey "^P" up-line-or-search
bindkey "^N" down-line-or-search
bindkey '^?' backward-delete-char
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
bindkey '^q' push-line-or-edit
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^V' edit-command-line
_history-incremental-search-backward () {
zle .history-incremental-search-backward $BUFFER
}
zle -N history-incremental-search-backward _history-incremental-search-backward
# case insensitive completion
autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
bindkey '^R' history-incremental-search-backward
bindkey -M isearch '^S' history-incremental-search-forward
function chpwd() {
emulate -L zsh
ls $LS_DEFAULT_ARGS
}
# speed up autocomplete when in git repos
__git_files () {
_wanted files expl 'local files' _files
}
eval "$(starship init zsh)"