-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc.tmpl
57 lines (46 loc) · 1.3 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
54
55
56
57
ZSH_THEME="dracula"
# Init Homebrew, which adds environment variables
eval "$(brew shellenv)"
source $HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Enable completions that are installed with Homebrew
fpath=($HOMEBREW_PREFIX/share/zsh/site-functions $fpath)
alias python="$(brew --prefix)/bin/python3"
# Oh my Zsh plugins. Can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
plugins=(
git
git-lfs
brew
fzf
npm
tig
web-search
zoxide
fnm
)
source $ZSH/oh-my-zsh.sh
alias vi="nvim"
alias vim="nvim"
alias vimdiff="nvim -d"
alias lsy="ls --hyperlink=auto"
alias cat="bat --paging=never --style=plain"
alias fd="fd --hidden"
alias icat="kitten icat"
alias d="kitten diff"
alias s="kitten ssh"
alias lg="lazygit"
alias ls="lsd"
eval "$(starship init zsh)"
eval "$(mcfly init zsh)"
# bindkey "^R" mcfly-history-widget # Ctrl+R binds mcfly
bindkey "^G" fzf-history-widget # Ctrl+G binds to fzf searcher
eval "$(fnm env --use-on-cd)"
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}