xcodexcode9code-foldingxcode10

Enable code-folding by default


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


Solution

  • 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.