5
votes

After installing Sublime Text 3, I try to use a custom keyboard shortcut (F5) defined in:

~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-keymap

The shortcut doesn't work, and I see in the console the following message:

Unable to open /home/gabriel/.config/sublime-text-3/Packages/Default/Preferences.sublime-settings

Not only this file is missing in ST's install directory, the entire ~/.config/sublime-text-3/Packages/Default/ folder is missing. But If I open Preferences/Key Bindings, the default keymap file is opened correctly:

enter image description here

and the path shown for that file is within the ~/.config/sublime-text-3/Packages/Default/ folder, which I know is not there (!)

What is going on here? How can I fix this?

3

3 Answers

2
votes

Why the Key Binding is not working is nothing to do with the default file paths, the directory not existing, or the console errors.

Restart Sublime Text and the Key Binding will work. Enable command logging to see that it's working: in the console sublime.log_commands(True).

Sublime text shouldn't be displaying the paths for those Default package files. The ~/.config/sublime-text-3/Packages/Default/ directory doesn't exist because those files are distributed with Sublime Text, you'll find the files in the the Default package where Sublime Text is installed e.g. /path/to/sublime_text_3/Packages/Default.sublime-package. .sublime-package files are essentially zip files. Ignore those paths, and the error messages in the console. Those are Sublime Text issues.

0
votes

None of these answers are directly solving the problem you nerds.

For the silicon-challenged, what you need to do is this:

go to the path that it's telling you doesn't exist:

 /home/gabriel/.config/sublime-text-3/Packages/Default/Preferences.sublime-settings

You are on the right track to deducing the source of the problem - I have the same problem but It wouldn't allow me to change the font for my text editing. Sublime must have an install problem. I'm on ubuntu 16.04 LTS .

Do this:

a. create the folder, name it "Default" - under "Packages"

b. go to your sublime text and go to preferences -> settings

c. copy everything on the LEFT side (it should be showing a full list of defaults, which you can't edit, and a user changeable file on the right)

d. go to the folder you just made (Default) -> inside it create a file with the exact name "Preferences.sublime-settings"

e. paste everything into it

f. restart sublime text

g. You are now a G

you're welcome

0
votes

I arrived here via a very similar search for why a directory was not being displayed in sublime text. In case anyone else arrives here from the same search, here's why:

directories that are known to house source control information and various binary output files are automatically excluded from the sidebar

Source: https://forum.sublimetext.com/t/missing-files-in-folder-tree/31145/3