Enable code-folding by default

Infinite picture Infinite · Mar 2, 2010 · Viewed 37.6k times · Source

Is there a way to tell XCode fold methods/functions by default when opening a file?

Answer

Kristian picture Kristian · Jul 28, 2011

Not sure if this is an OS change, or an Xcode change, but on Lion with Xcode 4, some of these commands cited by Griffo are performed with the Option modifier (the ⌥ key), not control. I've made some changes to reflect this:

Fold                       ⌥⌘←      option+command+left
Unfold                      ⌥⌘→      option+command+right
Unfold All                  ⌥U        option+U
Fold Methods/Functions      ⌥⌘↑      option+command+up
Unfold Methods/Functions    ⌥⌘↓      option+command+down

Sorry to necro a thread, but I thought this was worthwhile to revise.