Skip to content

Instantly share code, notes, and snippets.

@NorthIsUp
Last active December 15, 2015 14:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NorthIsUp/5273619 to your computer and use it in GitHub Desktop.
Save NorthIsUp/5273619 to your computer and use it in GitHub Desktop.
subl . should open MyProject.sublime-project if it is in the folder, else just open it as a regular folder
#!/usr/bin/env zsh
# like workon from python virtualenvwrapper
# assumes that you have all your coding projects in ~/src
subl ~/src/*${1}*
#!/usr/bin/env zsh
# drop in replacement for the subl alias that will check first to see if there is a
# *.sublime-project file in the directory you trying to edit.
#
# setup:
# `ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl2`
open $1/*.sublime-project(N) 2> /dev/null
[[ $? != 0 ]] && subl2 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment