1

我是 Sublime Text 的新手,我无法在任何地方修复或找到此问题的答案。我刚刚安装Sublime Text,一开始它运行良好。然后我尝试在 Preferences-> Settings User 下更改一些设置,例如字体大小。当我保存时,它返回错误:

尝试解析设置时出错:C:\Users\Michael\AppData\Roaming\Sublime Text 2\Packages\User\Preferences.sublime-settings:18:1 中的预期字符串

(我的 ST 包安装在哪里)现在,每当我尝试打开 Sublime Text 2 时,它都会显示相同的错误消息,并且不会运行。我卸载并重新安装了 ST,但问题仍然存在(在我尝试更改我的偏好之后)。我Sublime Text 2.0.2在 Windows 7 上运行。任何有关如何解决此问题的见解(或者更好的是,为什么首先出现此问题)都将受到欢迎。

编辑:这是首选项文件的内容(我不知道如何上传文件本身,如果可能的话)

// 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,
}
4

2 回答 2

2

删除最后一个逗号。改变:

"font_size": 10,

至:

"font_size": 10

于 2013-07-28T21:58:11.950 回答
0

我刚刚遇到了同样的问题,我通过以下方式解决了它:

  • 验证 JSON 是否有效
  • 确保文件编码为“UTF-8”(文件 > 使用编码保存...)
于 2014-11-17T14:02:57.067 回答