问题
How do I fix this error?
Error trying to parse settings: No data in ~/Library/Application Support/Sublime Text 2/Packages/User/JavaScript.sublime-settings:1:1
回答1:
Most likely you or something has created an empty file in your User config directory.
The config files must be valid JSON. The file in the question is empty and is not JSON.
Try deleting the file or get a fixed version from somewhere (not sure for what the file is being used for)
回答2:
Default installs c: / Program Files / Sublime Text 2
Changue by: c: / Program Files / Sublime Text
I do not know why, but it works .. :)
回答3:
Sublime Text 3 (Build 3059):
My JSON.sublime-settings was containing some XML-structure, no JSON.
Here the previous content of my file:
<dict>
<key>name</key>
<string>JSON String</string>
<key>scope</key>
<string>meta.structure.dictionary.json string.quoted.double.json</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#E6DB74</string>
</dict>
</dict>
I replaced it with the default content from SublimePrettyJson:
{
"use_entire_file_if_no_selection" : true,
"indent" : 2,
"sort_keys" : false,
"ensure_ascii" : false
}
This solved the problem for me. No more annoying error message. OS: Windows 7.
On my Ubuntu machines I never had this error, also not on my Mac.
回答4:
Please go to ../Library/Application Support/Sublime Text 2/Packages/User/ location and delete JavaScript.sublime-settings:1:1 file which has been created by you or any process must have created that.This would surely work.
来源:https://stackoverflow.com/questions/12360696/sublime-text-2-error-trying-to-parse-settings