Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 –  dreamexploded Jan 6 '13 at 15:19

2 Answers 2

up vote 1 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 :) –  dreamexploded Jan 6 '13 at 15:56

Also to supplement the above answer, the two packages you use https://github.com/TheDutchCoder/ColorConvert and https://github.com/weslly/ColorPicker 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.