dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit f014705cd9c2cbe392922c1ac0f39a770a474595 (patch)
parent 2f858a78f6a1f8933130e5e2e9e70eaedc40f702
Author: Alexander Karle <akarle@umass.edu>
Date:   Wed, 20 Dec 2017 23:49:47 -0500

Adding zshrc

Diffstat:
Azshrc | 41+++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+), 0 deletions(-)

diff --git a/zshrc b/zshrc @@ -0,0 +1,41 @@ +# Path to your oh-my-zsh installation. +export ZSH=$HOME/.oh-my-zsh + +# zsh theme +ZSH_THEME="refined" + +# Zsh plugins ( Example format: plugins=(rails git textmate ruby lighthouse) ) +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +export DEFAULT_USER="$(whoami)" + +# vi keymap in terminal +# credit: Doug Black (https://dougblack.io/words/zsh-vi-mode.html) +bindkey -v +bindkey jk vi-cmd-mode + +function zle-line-init zle-keymap-select { + VIM_PROMPT="%{$fg_bold[yellow]%} [% NORMAL]% %{$reset_color%}" + RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1" + zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select + +# alias for homebrew versions of things +alias ctags='/usr/local/Cellar/ctags/5.8_1/bin/ctags' +alias python python2 + +# other alias' +alias pgp='open -a "PariGP"' +alias vim='nvim' + +# cd to a parent directory +function pcd { cd ${PWD%/$1/*}/$1; } + +# syntax highlighting in commands +# must be at end of file +source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh