Sublime Forum

Can I change the command palette shortcut?


Hey all, I’ve been using Sublime Text for quite some time, and it’s fairly customized. Just started trying out Sublime Merge to see if I want to buy a license and switch from Sourcetree. So far so good. It’s MUCH faster, it integrates nicely with Sublime Text, and the aesthetics are a lot better.

However, I really don’t like Ctrl+P for the command palette. On Sublime Text I use Alt+Space. Is there any way for me to change that? I can’t find it in settings.




You can change the key bindings in Merge the same as in Text, though unlike Text there isn’t a menu entry that opens the requisite files for you automatically. In Text that’s implemented as a plugin and Merge currently doesn’t support plugins. So you have to do this sort of thing manually at the moment.

You can use Preferences > Browse Packages from the menu to open up the location where Merge stores its unpacked packages, and inside of there is your User package.

The key binding you want is:

    { "keys": ["alt+space"], "command": "show_command_palette" },

To put it in place, you need to create an appropriate key binding file, which would be something like Default (Windows).sublime-keymap (and/or Linux or OSX in place of Windows, depending on your situation).

You can also customize other bindings as well; for example I have this one in place so that switching repositories in Merge works the same as switching projects in Text:

    // Mimic quick switch project in Sublime.
    { "keys": ["ctrl+alt+p"], "command": "quick_switch_repository" },

To find the default bindings you need to look in the Packages folder that’s inside of the folder where you installed Merge; there is a Default.sublime-package and a Default - Merge.sublime-package present in there. Copy them out to somewhere else and rename them to .zip files instead, and you can look inside to see what the default bindings, menus and so on contain.

1 Like