Sublime Forum

Keymap to open settings

#1

I like the way to open settings in Mac [ cmd+, ]. But in ubuntu environment it’s not happening. My question is how to setup the Keymap.json to open settings file in ubuntu ( ctrl + , ).

0 Likes

#2
    { "keys": ["ctrl+,"], "command": "edit_settings", "args":
        {
            "base_file": "${packages}/Default/Preferences.sublime-settings",
            "default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
        }
    },

of course, its easy to find this out yourself using https://packagecontrol.io/packages/PackageResourceViewer and looking in Packages/Default/Default (OSX).sublime-keymap and searching for super\+, to see what keybinding is used on MacOS. Or on your Mac, type sublime.log_commands(True) in the ST Python console, and press super+, and check what command & args appear in the console.

3 Likes

#3

Pretty cool. I added that to my config as well. If I use the command edit_settings than there is also a little advantage. After the default setting names on the left is a special char. And if you click on the setting left than it ST will automatically switch with the cursor in the right window to the appropriate content of the setting. :slight_smile:

Pretty neat. Haven’t known that before.

0 Likes

#4

That’s not default behaviour, that’s one of the features in PackageDev. Not only will it jump the cursor to the other window and find the setting, it will also copy the default over and set you up to change it if you don’t have that setting customized yet.

I agree, it’s pretty awesome.

0 Likes