Another option is to use duti (http://duti.org / https://github.com/moretension/duti). Run brew install duti
, save a file like this as ~/.duti
:
com.sublimetext.3 public.plain-text all
Then run /usr/local/bin/duti ~/.duti
.
The changes should be applied immediately, so you don't have to restart like when editing com.apple.LaunchServices.plist
.
To also change the default application for executable scripts with no filename extension, add a line like this:
com.sublimetext.3 public.unix-executable all