-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
82 lines (67 loc) · 2.24 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# brew autocompletion. more at https://docs.brew.sh/Shell-Completion
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
fi
# add rbenv to path
export PATH="$HOME/.rbenv/bin:$PATH"
# prevent dir competion errors
# https://github.com/ohmyzsh/ohmyzsh/issues/6835#issuecomment-390216875
ZSH_DISABLE_COMPFIX=true
export ZSH=~/.oh-my-zsh
ZSH_THEME="robbyrussell"
HYPHEN_INSENSITIVE="true"
plugins=(git zsh-syntax-highlighting zsh-autosuggestions docker docker-compose bundler fzf zsh-nvm-auto-switch)
source $ZSH/oh-my-zsh.sh
git-replace() {
git grep -l "$1" | xargs sed -i '' -e "s/$1/$2/g"
}
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# # easier navigation
setopt auto_cd
cdpath=($HOME/dev;$HOME/dev/**)
# vim
alias v="nvim"
alias vd="cd ~/dev/dotfiles"
alias vv="cd ~/.config/nvim"
alias vz="v ~/dev/dotfiles/.zshrc"
alias vt="v ~/dev/dotfiles/todo"
# zsh
alias c="clear"
alias \$=""
alias path='echo $PATH | tr -s ":" "\n"'
alias pcat='pygmentize -f terminal256 -O style=native -g'
# git
alias ghb="gh browse"
alias gcs="git checkout staging"
alias gclean="git reset --hard && git clean -df"
# rails
alias mg="rails db:migrate && RAILS_ENV=test rails db:migrate"
alias mgb="rails db:rollback && RAILS_ENV=test rails db:rollback"
alias brf="bin/rspec --only-failures"
# tmux
alias mux="tmuxinator"
alias tn="tmux new-session -s"
alias tk="tmux kill-session -t"
alias ta="tmux attach -t"
alias tl="tmux ls"
alias l="gls -la --group-directories-first --color='auto'"
alias lg='lazygit'
alias fork="open -a 'Fork' ."
# misc
# alias ng="./ngrok http 3000"
bindkey -s '^G' ' | grep '
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
eval "$(rbenv init -)"
export AWS_PROFILE=default
# node version manager generated config
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"
export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"