Reputation: 567
I want the default sublime text 3 file type from "Plain Text" to Java. I tried by installing a package from github (), creating a new default_file_type setting and then setting:
{
"default_new_file_syntax": "Packages/Java.sublime-settings",
"use_current_file_syntax": true
}
But no luck so far. I guess the package works for version 2.
Any ideas?
Upvotes: 1
Views: 3933
Reputation: 102852
You almost got it right. The correct setting should be:
{
"default_new_file_syntax": "Packages/Java/Java.tmLanguage",
"use_current_file_syntax": true
}
You need to assign the path of the actual language syntax file (.tmLanguage
). Also, in case you weren't aware, the "use_current_file_syntax"
setting means that if you have a file open with a certain syntax, and hit CtrlN to open a new file, that new file will use the syntax of the previously open file, not necessarily Java. If you want all new files to have the Java syntax, set "use_current_file_syntax": false
.
Upvotes: 3