Skip to content

Instantly share code, notes, and snippets.

@tnajdek
Last active September 26, 2020 10:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnajdek/1752fc2ec933cd752ea5 to your computer and use it in GitHub Desktop.
Save tnajdek/1752fc2ec933cd752ea5 to your computer and use it in GitHub Desktop.
.zshrc for OSX
# ZSH history
setopt append_history
setopt hist_expire_dups_first
setopt hist_fcntl_lock
setopt hist_ignore_all_dups
setopt hist_lex_words
setopt hist_reduce_blanks
setopt hist_save_no_dups
setopt share_history
unsetopt menu_complete # do not autoselect the first completion entry
unsetopt flowcontrol
setopt auto_menu # show completion menu on succesive tab press
setopt complete_in_word
setopt always_to_end
# TERMINAL AND HISTORY
export CLICOLOR=1
export TERM=xterm-256color
export HISTSIZE=110000
export SAVEHIST=100000
export HISTFILE=~/.zsh_history
# ZPLUG
export ZPLUG_HOME=/usr/local/opt/zplug
source $ZPLUG_HOME/init.zsh
zplug "djui/alias-tips"
zplug "plugins/node", from:oh-my-zsh
zplug "plugins/npm", from:oh-my-zsh
zplug "lukechilds/zsh-nvm"
zplug "plugins/python", from:oh-my-zsh
zplug "plugins/pip", from:oh-my-zsh
zplug "plugins/pyenv", from:oh-my-zsh
zplug "plugins/virtualenvwrapper", from:oh-my-zsh
zplug "plugins/fasd", from:oh-my-zsh
zplug "plugins/cargo", from:oh-my-zsh
zplug "modules/directory", from:prezto
zplug "modules/git", from:prezto
zplug "modules/osx", from:prezto
zplug "lib/completion", from:oh-my-zsh
zplug "plugins/sublime", from:oh-my-zsh
zplug "zsh-users/zsh-autosuggestions", defer:2
zplug "zsh-users/zsh-completions"
zplug "zsh-users/zsh-history-substring-search", defer:3 # Should be loaded last.
zplug "zsh-users/zsh-syntax-highlighting", defer:3 # Should be loaded 2nd last.
zplug "mafredri/zsh-async", from:github
zplug "sindresorhus/pure", use:pure.zsh, from:github, as:theme
# ZPLUG: Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
zplug install
fi
zplug load
# completion menu
zstyle ':completion:*' menu select
zstyle ':completion:*' menu select=5
# AUTOSUGGESTIONS: Bind UP and DOWN arrow keys for subsstring search.
if zplug check zsh-users/zsh-history-substring-search; then
zmodload zsh/terminfo
bindkey "^[^[[A" history-substring-search-up
bindkey "^[^[[B" history-substring-search-down
fi
# ALIASES & FUNCTIONS
alias zshconfig="subl ~/.zshrc"
alias less="less -R"
alias grep="grep --color=always"
alias ip="ipconfig getifaddr en0"
alias ios='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
alias o="open"
function whatsonport () { echo "$(lsof -n -i4TCP:$1)"}
# EXPORTS
export EDITOR="subl -w"
export ANDROID_HOME=/usr/local/opt/android-sdk
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/.project
export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true"
export MONO_GAC_PREFIX="/usr/local"
export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:~/bin
export PATH="$(brew --prefix homebrew/php/php54)/bin:$PATH"
export PATH="/Users/doppler/.cargo/bin:$PATH"
export GOPATH=$HOME/.go
export DISPLAY=:0
# TRAVIS
[ -f /Users/doppler/.travis/travis.sh ] && source /Users/doppler/.travis/travis.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment