Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to install two Sublime Text plugin but their shortcut keys are conflicted. How can I fix this? Thanks

share|improve this question
You need to remap one of the shortcuts to something else. Do the plugins have menu entries in Preferences » Package Settings » Plugin » Key Bindings – User? For clarity: What plugins are you talking about? – slhck Jan 6 '13 at 15:13
No they don't have Key Bindings menu entries. I use these plugins : CSS Color Converter and Color Picker. both of them using cmd+shift+c – webchun Jan 6 '13 at 15:19
up vote 2 down vote accepted

Open Sublime and go to Preferences » Browse Packages….

Here, look for one of the conflicting packages—the one you want to change the shortcut for—and open the file Default (OSX).sublime-keymap (or any of the other files for other operating systems).

The file will contain the list of keyboard shortcuts the package accepts, e.g. here for the Alignment package.

    { "keys": ["super+ctrl+a"], "command": "alignment" }

Identify the command you want to change the shortcut for.

Now head to Preferences » Key Bindings – User, and override this shortcut, by copying the default shortcut, and simply changing the keys, for example:

    { "keys": ["super+ctrl+x"], "command": "alignment" }

Just make sure that the command is the same. Now save, and your user preferences will override the package's defaults. So whenever you press your user-defined shortcut, the right command is sent to the package.

You could, in theory, overwrite the default file in the package folder, which would be faster but harder to track down. Also, if the package ever updated, you'd lose your custom shortcut.

share|improve this answer
Thanks alot. I've decided to overwrite the keymap file :) – webchun Jan 6 '13 at 15:56

Also to supplement the above answer, the two packages you use and have keymap files, so you could edit these, but the above method would be better as it would survive any updates to those packages.

share|improve this answer
Yup. I had just made an edit explaining that caveat :) – slhck Jan 6 '13 at 15:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .