user2585222
user2585222

Reputation: 123

Error trying to parse settings in Sublime Text 2.0.2

I am new to Sublime Text, and I haven't been able to fix or find an answer to this problem anywhere. I just installed Sublime Text, and in the beginning it worked fine. Then I tried to change some settings under Preferences-> Settings User, e.g. font size. When I saved, it returned the error:

Error trying to parse settings: Expected string in C:\Users\Michael\AppData\Roaming\Sublime Text 2\Packages\User\Preferences.sublime-settings:18:1

(Where my ST packages are installed) Now, whenever I try to open Sublime Text 2, it displays the same error message, and will not run. I uninstalled and re-installed ST, and the problem remains (after I try to change my preferences). I am running Sublime Text 2.0.2 on Windows 7. Any insights into how to fix this problem (or better yet, why this problem emerged in the first place) would be most welcome.

Edit: This is the contents of the preference file (I don't know how to upload the file itself, if it is even possible)

// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
    // Sets the colors used within the text area
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",

    // Note that the font_face and font_size are overriden in the platform
    // specific settings file, for example, "Preferences (Linux).sublime-settings".
    // Because of this, setting them here will have no effect: you must set them
    // in your User File Preferences.
    "font_face": "",
    "font_size": 10,
}

Upvotes: 1

Views: 8439

Answers (2)

amypellegrini
amypellegrini

Reputation: 1026

I've just run into the same issue and I fixed it by:

  • Validate JSON is valid
  • Ensure file encoding is "UTF-8" (File > Save with encoding...)

Upvotes: 0

messivanio
messivanio

Reputation: 2311

Remove the last comma. Change:

"font_size": 10,

to:

"font_size": 10

Upvotes: 2

Related Questions