Sublime Forum

Error trying to parse settings - cant save the file

#1

I installed CSS3 plugin and it recommended to add some lines to the User settings file.

  "auto_complete_commit_on_tab": true,
  "auto_complete_with_fields": true,

When I copied it from the CSS3 text file and pasted it into my user settings and saved it, I get this error message?

Error trying to parse settings: Unexpected character, expected a comma or closing bracket in Packages/User/Preferences.sublime-settings:8:3

It’s been a long time since I used Sublime, I used to have a good setup guide, but now I’m trying to set it up for learning Python. Finding it difficult to find any decent guides. What is causing the above error?

0 Likes

#2

The settings file is JSON; in short that means that all of the settings in the file except the last one should have a comma after them. At the least you need to add a comma after the closing square bracket on the ignored_packages setting and auto_complete_commit_on_tab (if there is not one there; the image says there isn’t but the text you referenced in your question says there is).

Technically although a trailing comma on the last setting is not valid JSON, Sublime will allow it.

1 Like

#3

Thank you, that worked a treat. Any ideas on Sublime Text Python setup and use?

0 Likes

#4

Unfortunately not; I’m primarily a C and TypeScript developer so at the moment anything I do in python is just to extend/modify Sublime itself.

If you ask for tips or suggestions in another thread you might get some results from more hard core python developers, though.

0 Likes

#5

I’m using Python, but I like light and efficient stuff (that’s why I love ST). Have a look at anaconda, sublimeREPL (dead, but still “works”)

I’m subscribed to a sublime text tip news letter, and the author (Dan Bader) is promoting his course exactly about this. Unfortunately, it’s not free. Here’s the link: https://dbader.org/products/sublime-python-guide.

0 Likes

#6

BTW: I’ve done a plugin for Sublime Text that manage those comma in JSON for you: JSONComma

0 Likes