Sublime Text 2 Error Trailing comma before closing bracket
Solution 1
Go to Preferences > Settings - User
. AppData is hidden by default in Windows, show with the explorer's folder options.
Your problem is that you have an extra comma somewhere in that file. Remove the comma from the last setting in any list. Without seeing that file, I can not tell you where exactly. Here are 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 setting2's list.
Solution 2
The above answers helped me out on sublime text 3
But just wanted to add this...
For newbies like me, if you want to add your custom settings and you tried adding it to the Preference file and you're getting the error too... In my case I did like the following...
{
"ignored_packages":
[
"Vintage"
], // <-- I put the comma there so I can add the below, new setting.
"tab_size": 2 //My new setting
}
Rajanand Ilangovan
Updated on June 14, 2022Comments
-
Rajanand Ilangovan almost 2 years
I changed the user setting from preference and saved it. Then i tried to open editor but i get the error message. So i uninstalled and installed it again. Though, no use. Also the path mentioned in the error message also is not there.
The error message is:
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?
-
Sal Rahman over 11 yearsAre you sure that AppData is not hidden?
-
Rajanand Ilangovan over 11 yearsyes, it was hidden. sorry.. with the help of @d_rail I have corrected the error.
-