-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot_zshrc.tmpl
53 lines (40 loc) · 1.35 KB
/
dot_zshrc.tmpl
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
#!/bin/zsh
PROMPT=$'\n%F{#54546d} $ %f'
# setopt nullglob
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt AUTO_PUSHD # Push the current directory visited on the stack.
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
# Enable completion
autoload -U compinit; compinit
# Enable vim
bindkey -v
export KEYTIMEOUT=1
# Vim Mapping For Completion
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
# Editing Command Lines In Vim
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
# Plugins
source $HOME/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $HOME/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Set up fzf key bindings and fuzzy completion
source <(fzf --zsh)
{{ if eq .chezmoi.os "darwin" -}}
# Source env vars
if [ -d ~/.zsh/envs ]; then
for file in ~/.zsh/envs/*(.); do
if [[ -f "$file" ]]; then
source "$file"
fi
done
fi
eval "$(/opt/homebrew/bin/brew shellenv)"
source ~/.orbstack/shell/init.zsh 2>/dev/null || :
{{ end -}}
source "$HOME/.zsh/aliases.zsh"