diff --git a/.gitignore b/.gitignore index dc868103..2225dc5f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ lib/custom.bash plugins/custom.plugins.bash *.swp .*.un~ +.subl-*/* diff --git a/plugins/available/subl.plugin.bash b/plugins/available/subl.plugin.bash new file mode 100644 index 00000000..f8dc2845 --- /dev/null +++ b/plugins/available/subl.plugin.bash @@ -0,0 +1,13 @@ +cite about-plugin +about-plugin 'Add Sublime Text cli binary "subl" to path' + +SUBL_BIN="/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" +SUBL_LOCAL_DIR=$BASH_IT/.subl-bin/ +SUBL_LOCAL_BIN=$BASH_IT/.subl-bin/subl + +if [ ! -f $SUBL_LOCAL_BIN ]; then + mkdir -p $SUBL_LOCAL_DIR + ln -s "$SUBL_BIN" $SUBL_LOCAL_BIN +fi + +export PATH=$PATH:$SUBL_LOCAL_DIR