Last week I have a short lightning talk with Jesse Collis (@sirjec) at the Melbourne Cocoaheads meetup. The topic was fairly boring, just some useful Xcode 4 shortcuts we have found since switching from Xcode 3 a few weeks ago. It ended up being a bit of a laugh, probably the first and only time a talk about keyboard shortcuts will be funny - I think it had something to do with the pizza and beer that had just arrived.
Jesse saved me the effort of writing up anything more and linking to the slides on his blog below.
I've managed to find the video footage of the xcode shortcuts talk put together by Oliver Jones (@orj) on vimeo. After flicking through the footage a couple of questions were raised that I can now answer:
- Q: Does Cmd+Option+[ or ] work if multiple lines are selected?
- Q: Does Ctrl+6 for the class outline in the jump bar work in non-primary editors?
A: Yes, it is based on the editor that has focus.
- Follow up: Proper clean (Cmd+Option+Shift+K) did not completely clean the build for us.
rm -rfis still your friend
The Melbourne Cocoaheads faithful also contributed some keyboard shortcuts of their own, here are the ones I jotted down:
- Cmd+Ctrl+Opt+? - open item under the cursor in Xcode help ("real help, not the stupid little help" @tupps)
- Cmd+Double-Click - drill through to the implementation
- Cmd+Opt+, - open current file back in the main editor
- Cmd+/ - Comment Line
- Cmd+Shift+[ or ] - navigate back and forth between tabs
- Cmd+T - Open new tab (same as Safari)
- Cmd+Ctrl+Up and Down - switch between counterparts
and a few more shortcuts I've found since then:
- Cmd+Ctrl+Opt+Up - open up the counterpart in the secondary editor
- ... - Organise Import... just kidding. Maybe one day.
I'm sure there are plenty more shortcuts I haven't found yet. Let me know the ones you find most useful.