-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzshrc
More file actions
69 lines (55 loc) · 1.55 KB
/
zshrc
File metadata and controls
69 lines (55 loc) · 1.55 KB
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
# Tab-complete .. !
zstyle ':completion:*' special-dirs true
# Aliases
alias ls='ls -FGhp'
alias ll='ls -l'
alias p='tmux new-session -A -s "${PWD##*/}"'
# History
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=50000
export SAVEHIST=10000
setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_DUPS
setopt HIST_VERIFY
setopt SHARE_HISTORY
# PATH
export PATH="$HOME/.local/bin:/usr/local/bin:/usr/local/sbin:$PATH"
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" # MacPorts
export PATH="$HOME/go/bin:$PATH"
export EDITOR='nvim'
export FPATH="/opt/local/share/zsh/5.9/functions:$FPATH"
export SHELL="$(command -v zsh)"
# Emacs mode
bindkey -e
# fn + backspace = delete
bindkey "\e[3~" delete-char
# home/end
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
# page up/down = word back/forward
bindkey "\e[5~" backward-word
bindkey "\e[6~" forward-word
# Edit commands in the $EDITOR
autoload -z edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
# fzf
source <(fzf --zsh)
# direnv
eval "$(direnv hook zsh)"
# starship
eval "$(starship init zsh)"
# completions
fpath=(~/.zsh/zsh-completions/src $fpath)
autoload -Uz compinit
compinit
# plugins
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down