Sublime Forum

Having trouble opening app

#1

For some reason, every time I try to open sublime text for the first time after I turn on my computer, I get this error message. After that, every time I try to open sublime text again, nothing happens and I stop receiving that error message. I tried to install and uninstall but it’s doing the same thing. I don’t know what to do :’(

0 Likes

#2

The error message is telling you that one of your settings files is broken. In particular it’s the Plain text.sublime-settings file, which is stored in your User package in the Packages folder, and the error is encountered at line 3, column 2,

The Packages folder is stored in your home directory and it left alone when you uninstall or reinstall Sublime because it’s the location that stores all of your user customizations you’ve done. As such, uninstalling and reinstalling Sublime will have no effect; In order to fix the problem you need to fix what’s wrong with that file.

The general solution is to open up the file and look around the location that it’s telling you about, and fix it. sublime-settings files are JSON files, so they need to start with {, end with } and everything in between needs to be in the form of "setting": setting_value, noting that the trailing comma is important as it separates the settings from each other.

You’d find the appropriate file by following the path that it shows you to the file; select Preferences > Browse Packages to open a file explorer on the Packages folder, then go from there to find the file and open it.

In your case the easiest thing to do would be to select File > New File to create a new empty file, which will be of type Plain text automatically. Then select Preferences > Settings - Syntax Specific to open up the settings file for plain text and fix what’s wrong with it.

0 Likes

#3

https://www.sublimetext.com/docs/3/revert.html will also show you where the data files are stored, in case you can’t open ST to use the Preferences menu

0 Likes

#4

I looked at the file but I can’t find anything wrong with it. All the commas and semicolons look to be in the correct places. Is it possible to re-install and replace the Packages folder?

0 Likes

#5

It looks like your problem is that you’re trying to put key bindings into a settings file. The file in the original error message is Plain text.sublime-settings, but your screenshot shows key bindings that should be in a sublime-keymap file instead.

Now we can say that in particular the error message about expecting a value is telling you that it expected to see a setting (i.e. something in "double_quotes") but it found something else instead (in this case, a { character).

In order to fix your problem you need to remove the key bindings from the file.

If your intention was to have key bindings that are specific to plain text files, you go about that in a different way that we can help you with. If not, then perhaps you selected the wrong menu item and you meant to implement some custom key bindings instead, in which case you should cut the data from here and paste them into your key mappings, which are available via Preferences > Key Bindings.

0 Likes

#6

I took a screenshot of the Plain text.sublime-settings file. Should I just delete everything in the file? I no longer need the key bindings

0 Likes

#7

I would say that if the file only contains the key bindings you can delete the file completely. You only need to keep it around if it has some settings specific to plain text files in it as well, in which case remove the bindings but leave the settings there.

0 Likes