Skip to content

Instantly share code, notes, and snippets.

@knowuh
Last active August 29, 2015 14:16
Show Gist options
  • Save knowuh/c26cb8732f68c9522476 to your computer and use it in GitHub Desktop.
Save knowuh/c26cb8732f68c9522476 to your computer and use it in GitHub Desktop.
Open the current directory with subl (sublime text) -- optionally using a project file.
#!/bin/bash
# Chmod this u+x and put it in your $PATH
# Open the first .sublime-project or the working dir
# in SublimeText assumes that `subl` is in your path
for f in ./*.sublime-project; do
if [ -e "$f" ]
then
subl --project "$f"
else
subl .
fi
break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment