Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Xcode 4 has a Focus code blocks on hover setting in Preferences > Text Editing. enter image description here

When you hover the mouse on a Code folding ribbon, the mentioned setting has the effect shown in image below. enter image description here Also, the effect stays put when you navigate with the keyboard (even when you move focus to Assistant editor, Navigator, Utilities, ... but not to, say, Organizer or Version editor).

How could you add a key binding for this?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted
  • Go to Settings > Keybindings and search for focus.

  • Then set your desired keybinding under Code Folding > Focus Follows Selection.

enter image description here

share|improve this answer
    
Was this added in Xcode 4.6? I could've sworn I already searched with "focus". :) Nevertheless, this is great. Thank you Bryan! –  courteous Feb 12 '13 at 17:39
    
I'm not sure when this was added. This also works on Xcode 4.5.2, which is the oldest version that I have installed for my computers. –  Bryan Luby Feb 12 '13 at 17:55
    
Now I remember: the menu entry was there in Xcode 4 from the get-go, but was oddly disabled. –  courteous Feb 13 '13 at 6:40
    
OMG I just discovered this feature... super useful! –  unmircea Jan 3 at 14:51
add comment

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.