SetTo set Sublime Text as the default handler for public.plain-text:
Mavericks (10.9) and earlier
defaults write com.apple.LaunchServices \
LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
This answer is for Mavericks and earlier.
Yosemite (10.10) and later
For Yosemite and later, useUse com.apple.LaunchServices/com.apple.launchservices.secure.
defaults write com.apple.LaunchServices/com.apple.launchservices.secure \
LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
Remember to restart to pick up the changes.