Source: How to customise file type to syntax associations in Sublime Text?
In Sublime Text (confirmed in both v2.x and v3.x) there is a menu command:
View -> Syntax -> Open all with current extension as …
I put my customized changes in the User package:
*nix: ~/.config/sublime-text-2/Packages/User/Scala.tmLanguage
*Windows: %APPDATA%\Sublime Text 2\Packages\User\Scala.tmLanguage
Which also means it’s in JSON format:
{
"extensions":
[
"sbt"
]
}
This is the same place the
View -> Syntax -> Open all with current extension as ...
menu item adds it (creating the file if it doesn’t exist).