-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
63 lines (50 loc) · 2.79 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
61
62
63
################################################################################
# Information
################################################################################
# Maintained by William W. Marx (m94@marx.sh)
# 🄯 Copyleft 2022, All Wrongs Reserved
# https://github.com/williamwmarx/shell
################################################################################
# Base Installs
################################################################################
# ----------------------- Oh-my-zsh syntax highlighting -----------------------
if [[ ! -d $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]]; then
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
fi
# ------------------------- Oh-my-zsh autosuggestions -------------------------
if [[ ! -d $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions ]]; then
git clone https://github.com/zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
fi
################################################################################
# Config
################################################################################
# ------------------------------ Oh-my-zsh Config -----------------------------
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="t3"
plugins=(zsh-syntax-highlighting zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
# ---------------------------- ARM64 Homebrew PATH ----------------------------
if [[ `uname -sp` == "Darwin arm" ]]; then export PATH="${PATH:+${PATH}:}/opt/homebrew/bin"; fi
# --------------------------------- Fzf Config --------------------------------
if [[ `which fzf &>/dev/null && echo "$?"` -eq 0 ]]; then
if [[ ! "$PATH" == *$HOME/.fzf/bin* ]]; then export PATH="${PATH:+${PATH}:}$HOME/.fzf.bin"; fi
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2>/dev/null
if [[ `which fd &>/dev/null && echo "$?"` -eq 0 ]]; then # If fd is available, use it
_fzf_compgen_path() { fd -HLE ".git" -E "Library" . $1 }
_fzf_compgen_dir() { fd -HLtd -E ".git" -E "Library" . "$1" }
fi
source "$HOME/.fzf/shell/key-bindings.zsh" # Source key bindings
fi
################################################################################
# Startup
################################################################################
# ------------------------------ Vimify Everything ----------------------------
set -o vi # Vi mode
bindkey -M vicmd v edit-command-line # Hitting `v` in escape mode opens command in Vim
export MANPAGER="vim -M +MANPAGER --not-a-term -"
# ----------------------------------- ZSH Rules -------------------------------
setopt inc_append_history_time # Put time in history so we can see how long it takes things to run
source $HOME/.aliases
source $HOME/.functions