Repository navigation
Expand file tree
/
Copy pathzshrc
More file actions
74 lines (55 loc) · 1.62 KB
/
Copy pathzshrc
File metadata and controls
74 lines (55 loc) · 1.62 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
70
71
72
73
74
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
# Brew completion
# https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh
if type brew &>/dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
# load our own completion functions
fpath=(~/.zsh/completion $fpath)
# initialize completion
autoload -Uz compinit
compinit
for function in ~/.zsh/functions/*; do
source $function
done
# automatically enter directories without cd
setopt auto_cd
# use vim as the visual editor
export VISUAL=vim
export EDITOR=$VISUAL
# vi mode
bindkey -v
bindkey "^F" vi-cmd-mode
bindkey jj vi-cmd-mode
# use incremental search
bindkey "^R" history-incremental-search-backward
# add some readline keys back
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
# handy keybindings
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"
# ignore duplicate history entries
setopt histignoredups
# keep TONS of history
export HISTSIZE=10000
export SAVEHIST=10000
export HISTFILE=~/.history
# share history between simultaneous shells
setopt SHARE_HISTORY
# do not store space ' ' prefixed commands in history
setopt HIST_IGNORE_SPACE
# Enable extended globbing
setopt EXTENDED_GLOB
# enable comments in command line
setopt interactivecomments
# do not catch ctrl+s
stty -ixon
# edit command in vim by hitting ESC+v
autoload edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
source /Users/head/.docker/init-zsh.sh || true # Added by Docker Desktop
eval "$(/opt/homebrew/bin/mise activate zsh)"