Skip to content

Instantly share code, notes, and snippets.

@brunogama
Created November 17, 2012 19:01
Show Gist options
  • Save brunogama/4098889 to your computer and use it in GitHub Desktop.
Save brunogama/4098889 to your computer and use it in GitHub Desktop.
this is helper function to open sublime text in the current directory. if there is a sublime-project file it will choose to open that file instead of doing subl ./
ss() {
__project=$(find . -iname "*.sublime-project" -d 1)
if [ -n "$__project" ]; then
echo "Opening ${__project}"
open $__project
else
echo "s $(dirname $0)"
subl $(dirname $0)
fi
unset __project
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment