Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (79 sloc) 2.57 KB
# get auto completes going
autoload -U compinit
compinit
bindkey '^I' complete-word # complete on tab, leave expansion to _expand
TZ="Europe/London"
HISTFILE=$HOME/.zhistory
HISTSIZE=20000
SAVEHIST=20000
setopt HIST_IGNORE_SPACE
HOSTNAME="`hostname`"
PAGER='less'
LC_ALL='en_US.UTF-8'
GIT_MERGE_AUTOEDIT=no
export GIT_MERGE_AUTOEDIT
# the one true way
export EDITOR='vim'
# emacs style bindings
bindkey -e
# load rbenv
if which rbenv > /dev/null; then eval "$(rbenv init - zsh)"; fi
# this allows Vim to use C-s as a mapping
stty -ixon
# execute binstubs by default
export PATH="./.bundle/binstubs:$PATH"
# execute things in the ./bin directory
export PATH="./bin:$PATH"
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home"
export PATH=/opt/apache-maven-3.3.9/bin:$PATH
# heroku toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export AUTOENV_FILE_ENTER=".env"
source $HOME/antigen/antigen.zsh
antigen bundle Tarrasch/zsh-autoenv
antigen bundle robbyrussell/oh-my-zsh plugins/z
antigen bundle robbyrussell/oh-my-zsh plugins/npm
antigen bundle robbyrussell/oh-my-zsh plugins/colorize
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen apply
# used so Ag can tab complete from ctags file
fpath=(~/dotfiles/zsh/completion $fpath)
export NVM_DIR="/Users/jackfranklin/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
# from https://github.com/creationix/nvm#deeper-shell-integration
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" != "N/A" ] && [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
# z plugin gets aliased to `j`
alias j="z"
# so autoenv runs all the time, even when you open a tmux split
cd .
source $HOME/dotfiles/zsh/aliases
source $HOME/dotfiles/zsh/functions
source $HOME/dotfiles/zsh/prompt
source $HOME/dotfiles/zsh/secret
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='ag -g "" --hidden'
export GOPATH=$HOME/git/go
export PATH="$GOPATH/bin:$PATH"
# execute locally installed npm modules
export PATH="./node_modules/.bin:$PATH"
# put things in ~/.bin into my $PATH
export PATH="$HOME/.bin:$PATH"
# yarn
export PATH="$PATH:`yarn global bin`"