Error Sublime Text 2 Error before comma before closing bracket

I changed the user setting as I wanted and saved it. Then I tried to open the editor, but I got an error message. So I uninstalled and installed it again. Although useless. Also, the path mentioned in the error message is not specified.

Error message:

Error trying to parse setting: Trailing comma before closing bracket in C:\Users Rajanand\AppData\Roaming\Sublime Text 2\Packages\User\Preferences.sublime-settings:5:1 

What am I missing here?

+7
source share
2 answers

Go to Preferences > Settings - User . AppData is hidden by default in Windows, displayed with explorer folder options.

Your problem is that you have an extra comma somewhere in this file. Remove the comma from the last setting in any list. Without seeing this file, I can’t say exactly where. Here are some examples:

 { setting1, setting2, last_setting,<-- remove } 

Remove the comma from the last setting.

or

 { setting1, setting2: [ setting2_item1, setting2_last_item,<-- remove ] } 

Remove the comma from setting2_last_item.

or

 { setting1: [ setting1_item ], setting2: [ setting2_item ],<-- remove } 

Remove the comma after the settings list 2.

+17
source

The above answers helped me rise above the exalted text 3

But just wanted to add this ...

For beginners like me, if you want to add your custom settings, and you tried to add it to the settings file, and you get an error too ... In my case, I liked the following ...

 { "ignored_packages": [ "Vintage" ], // <-- I put the comma there so I can add the below, new setting. "tab_size": 2 //My new setting } 
+1
source

All Articles