csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

Restrict the default key binding to when a CSS syntax is active #33

Open TrevorBurnham opened 10 years ago

TrevorBurnham commented 10 years ago

This PR is intended as a complement to https://github.com/csscomb/sublime-csscomb/pull/32, which I think is a very solid change.

Currently, the CSScomb command is a no-op unless an appropriate syntax is detected. This PR makes the key binding do the same syntax-checking that the CSScomb command does in #32. This prevents the command from interfering with other plugins that may use the same keyboard shortcut in other contexts. For example, I use SublimeGit, which uses Ctrl+Shift+C for its "Git Commit Amend" command, but only in its SublimeGit Status context.