Sublime Text 2: Error trying to parse settings

此生再无相见时 提交于 2020-01-31 03:11:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!