First instance of the Sublime Text 2 plugin

* Sets up PATH on OS X for subl access if it's not already there
* Adds some handle aliases for working with ST2 from the command line

More to come!
This commit is contained in:
Ian Chesal 2012-03-07 17:03:55 -05:00
commit 47a4798218

View file

@ -0,0 +1,20 @@
# sublime-text-2.plugin.zsh
#
# An oh-my-zsh plugin for Sublime Text 2
# Primarily targetted at OS X ST2 users but this might work for
# Linux as well.
#
SUBL=`which subl`
if [[ $SUBL == 'subl not found' ]] ; then
if [[ `uname` == 'Darwin' ]] ; then
if [ -d /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin ] ; then
export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:${PATH}
fi
if [ -d ~/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin ] ; then
export PATH=~/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin;${PATH}
fi
fi
fi
alias st='subl'
alias stzsh='subl ~/.zshrc'