XCode is a little weak in the way that it obliges you to format code, and the restrictions it places on you. I’m thinking of things such as select a block of code and use tab to reposition the whole block, which is very useful for cleaning up indenting, amongst other things.
I realise that I can use an external editor (such as Sublime Text 2, which is superb and my daily editor) to edit code, but I’m wondering if there are any plugins or tools which exist out there which integrate into xcode to improve this development experience.
What kind of extensions exist for xcode, or if there aren’t any, are there any lesser-known features which assist in improving this?
It’s hard to give you an answer, as we don’t know what features you use elsewhere that you think are missing in Xcode. For example, you can move a block of code in or out by pressing
Cmd-{orCmd-}. Or you can “fix” the indenting by usingctrl-ias jrturton pointed out above. All of the emacs keybindings work. In fact, you should look over the key bindings in the prefs to see what other things are possible. Some of my favorites are:1) Select a word and hit
Cmd-Eto make it the search term. ThenCmd-Gto find the next instance.2)
F6to step over in the debugger,F7to step in andF8to step out3) As much as I hate command lines,
gdbhas a number of useful commands for calling methods while stopped at a breakpoint. You can call any function or C++ or Objective-C method using thecallcommand. (Typehelp callat the gdb prompt to learn more.)4) If your index is up-to-date, you should be able to Cmd-click on a symbol to go to it’s definition, or option-Click to see its documentation.
Are those the sorts of things you’re looking for? If not, please give examples of what you want. As far as I know there is no plug-in mechanism in Xcode 4, so no extensions exist.