Opening Sublime Text Settings in a Standard Tab

Sublime Text is my text editor of choice. With version 3 currently in beta, the dev channel releases (only available to registered users) have been steadily been improving the application and adding new features.

Something irked me earlier this fall, however.

One day, as I pressed the hotkey to bring up my user preferences, an entirely new window popped up, displaying the application default settings and my user settings beside each other (as can be seen in the image below).

New, unwanted behavior

While great for discoverability, I really don't want to be dragged out of my current context; as I often work in full screen mode, I want to open my preferences in a normal tab.

After a quick question to Will Bond - perhaps most known for Package Control, Sublime Text's unofficial package manager - who now works on Sublime Text, I figured out how to revert to the old functionality.

P.S. In the following pieces of code, ${packages} refers to the place where Sublime Text Packages are stored on your system. This path is ~/Library/Application Support/Sublime Text 3/Packages on my mac.

First, I added the following to ${packages}/User/Main.sublime-menu:

        "caption": "Preferences",
        "mnemonic": "n",
        "id": "preferences",
                "command": "open_file", "args":
                {"file": "${packages}/User/Preferences.sublime-settings"},
                "caption": "Settings – User"

This adds an entry for the user preferences to the main menu.

After this, I added the following to ${packages}/User/Default (OSX).sublime-keymap (as I'm on macOS):

        "keys": ["super+,"],
        "command": "open_file",
        "args": {
            "file": "${packages}/User/Preferences.sublime-settings"

Finally, I could once again easily open my user preferences in a normal tab (as seen below).

Wanted behavior

The UI theme used in the images above is one made by me called Faarikaal; the color scheme is a custom variation of "Tomorrow Night Bright" that is distributed with the theme.

If you're a bit too productive, you might want to check out my Xkcd viewer for Sublime Text 3, which will let you browse Xkcd comics directly from your editor.

Newer post
Older post
Hello World