Sublime Text 2: Error trying to parse settings

后端 未结 4 2010
半阙折子戏
半阙折子戏 2021-02-05 10:53

How do I fix this error?

Error trying to parse settings: No data in ~/Library/Application Support/Sublime Text 2/Packages/User/JavaScript.sublime-settin

相关标签:
4条回答
  • 2021-02-05 11:31

    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)

    0 讨论(0)
  • 2021-02-05 11:31

    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.

    0 讨论(0)
  • 2021-02-05 11:37

    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.

    0 讨论(0)
  • 2021-02-05 11:48

    Default installs c: / Program Files / Sublime Text 2

    Changue by: c: / Program Files / Sublime Text

    I do not know why, but it works .. :)

    0 讨论(0)
提交回复
热议问题