When I have a command A of OBjective-C that has key Command-Shift-R, and command B of Text mode that has the same hotkey, I have a pop up with the activation key of Command-Shift-R regardless of the mode I'm in.

How can I make it mode sensitive? I mean, how can I run Objective-C command only when I'm in Objective-C mode?

link|improve this question

74% accept rate
feedback

1 Answer

up vote 1 down vote accepted

You need to assign a scope to the command.

Open Bundles » Bundle Editor » Bundle Editor... and select the command you want to change.

Look for the command in the Objective-C category and select it, then enter a scope to the lower right, probably source.objc, source.objc++. Then the command will be available anywhere in files with Objective-C highlighting.

Check out the other commands in the Objective-C category for more specialized scopes, e.g. Documentation for Selector and its scope meta.bracketed.objc | meta.function.objc.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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