-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
60 lines (50 loc) · 1.33 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
# LVL 0 env vars --- no depedencies
export CLANGDIR='/opt/clang/clang-13.0.0'
export FZF_DEFAULT_COMMAND='fd --type f --color=never'
export LESS="-RFX"
export PROMPT='%(1j.* .)%1~ %(?.%F{black}.%F{red})%#%f '
export PYENV_ROOT="$HOME/.pyenv"
export PYENV_VERSION='3.10-dev'
export PYTHONDONTWRITEBYTECODE=1
export RUST_BACKTRACE=1
export VISUAL=vim
export ZOOM_ROOMS='/Users/nick/Desktop/zoom.json'
# LVL 1 env vars --- 1 dependency
export EDITOR="$VISUAL"
# emacs
bindkey -e
autoload edit-command-line; zle -N edit-command-line
bindkey -M vicmd v edit-command-line
bindkey '^U' backward-kill-line
appendpath()
{
export PATH="$PATH:$1"
}
appendpath "$HOME/.cargo/bin"
appendpath "$PYENV_ROOT/bin"
appendpath "/usr/local/smlnj/bin"
appendpath "$HOME/bin"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# copped from https://unix.stackexchange.com/a/250700
sane-backward-delete-word() {
local WORDCHARS=${WORDCHARS/\//}
zle backward-delete-word
}
zle -N sane-backward-delete-word
bindkey '^W' sane-backward-delete-word
# copped from https://unix.stackexchange.com/a/273863
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000000
SAVEHIST=10000000
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_SPACE
tmp() {
(t=$(mktemp -d) && cd "$t" && "$SHELL")
}
o() {
open "$@"
}
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh