Sublime Forum

Error trying to parse file pop up


Error trying to parse file: unexpected character, expected a comma or closing bracket in Packages/Use/Default(OSX).sublime-keymap:3:2

This error pops up everytime I open up Sublime Text and can’t seemt to figure out why?
Anyone have any solutions?



It seems you’ve edited your custom keybindings to be invalid. I suggest going to Preferences > Key Bindings and making that file valid JSON.



here is what I have in that package…

	{ "keys": ["alt+s"], "command": "auto_save" }
	{ "keys": ["alt+s"], "command": "auto_save", "args": {"all_files": true, "backup": true} }
	{ "keys": ["ctrlΩ+shift+s"], "command": "auto_save" }
	{ "keys": ["ctrl+shift+s"], "command": "auto_save", "args": {"all_files": true, "backup": true} }
{ "keys": ["ctrl+shift+s"], "command": "auto_save" }
      "keys": ["super+shift+r"], "command": "browser_refresh", "args": {
        "auto_save": true,
        "delay": 0.0,
        "activate": true,
        "browsers" : ["chrome"]

how do I make it a JSON file?



I suggest either learning JSON (it’s a very simple format) or just looking at the left pane as an example. You have missing commas and extraneous lists in there.



It would help just to know where a comma is missing. Because even uninstalling the program and reinstalling the program still doesn’t make this error go away. So please help me so I can stop this error from happening because this should not be happening from sublime.



Your problem is more endemic than just a missing comma; as mentioned, use Preferences > Key Bindings and compare what is in the left hand pane to what you have here.

To whit:

  • The entire file should start with [ and end with [ because it is a list; you have three lists. All of the items should be combined together into one list as shown in the defaults on the left
  • Every item in a list needs to be separated from each other by a comma; in all of your lists, none of the key bindings have a comma after them

Uninstalling and reinstalling doesn’t make the problem go away because this is part of your settings; if that worked, then every time you uninstall and reinstall, every customization you made would be wiped clean, which is Not Good :tm:. Leaving user configuration behind when uninstalling applications is not specific to Sublime.



Okay I understand, but how do I wipe clean everything so that I start fresh with sublime text. It should technically wipe clean every customization I made which is fine because I can always readd it. So if the matter can be looked into for me to be able to fix that customization, then please let me know or give me your customization side of what that binding is so that I don’t have to figure it out on my own like that because I don’t know much about it and I would like to get this fixed ASAP



You can revert to a freshly installed state:

1 Like