40 Powerful Shortcuts of Xcode 6.x

Preview:

Citation preview

40 Powerful Shortcuts of Xcode 6.x

kimbs.cn

command + ,

• Account settings

• Turn off the boring building sound

• Code color

• Indentations

• etc.

option + click (file)

• Open the file in assistant editor

• We have to compare code very often!

command + enter

• Show standard editor

• But most of time we use it to close the assistant editor

click + click (file)

• Open and edit in a separate window

• Very useful if you have two or more screens

command + shift + t

• Open a new window with current state

• I generally use one for design and another for coding

command + n

• Create new file(s)

• The most commonly used

command + option + a

• Add files to current project

• We use it very often especially for those have many assets and images

command + o

• Open a file

• Open the UI designs is what I most commonly used

command + shift + o

• Search and open quickly

• I call it the “Xcode Spotlight”, the great tool for reference and learning

command + click (file)

• Go quickly to the definition of the selection

option + click (file)

• Open the quick short document

command + shift + s

• Duplicate file

• Fast copy and create another class

control + command + s• Create a snapshot

• It helps to prevent small changes that break your current state

command + :

• Show spelling and grammar

• Useful for perfectionist

command + option + .

• Refactor -> Rename , to rename a word in the project

• I use it very often, but have to set it manually! (empty key by default)

control + command + space

• Choose special characters

• Sometimes we do need fun!

command + 1-8

• Switch navigators

• Back to project navigator (Command + 1) is most commonly used

option + command + 0-6

• Utilities switching

• The “trigger” (option + command + 0) is what we use everyday.

command + f

• Find in file

• You must be very familiar with it

option + command + f

• Find and replace in file

command + shift + f

• Find in project

command + option + shift + f

• Do not use it in most of the time!

• Usually we use Refactor Rename instead

control + command + <- / ->

• Go forward or back in the editor

• But I prefer to use two fingers swipe

command + L

• Jump to line

• It’s used in every kind of IDE!

esc

• Show completions

• We can also use “control + space”

control + i

• Re-indent

• Make the perfect indentation automatically

command + [ / ]

• Shift left and shift right

• Use them to move around the block

option + command + [ / ]

• Move lines up or down

• I use it to move the block up and down

command + /

• Comment selection

• (Un)comment the lines as we did on every IDE

option + command + <- / ->

• Fold and unfold the blocks

• I prefer to do this directly on the editor

shift + option + cmd + <- / ->

• Fold / unfold methods and functions

• They help me to handle the big class!

command + r

• Build and run your project

command + b

• Build your project

• Sometimes we just want to build and see, without running

control + command + r

• Run without building

• Building is a pain especially for big project

• Sometimes we just want to “see it” again

shift + command + k

• Clean the project

• We use it very often

command + y

• Activate and deactivate the breakpoints

• Those breakpoints are too small to click!

How about debug?

• Use the debug panel directly!

shift + command + 0

• Documentation and API Reference

• We should keep updating the docs and learning everyday!

shift + command + 1

• Show welcome to Xcode

• It’s not just say “hello”! But to create or open the project

More editor tips• The Emacs Style:

• control + f move forward

• control + b back

• control + p move up

• control + n move down

• control + a move to beginning of the line

• control + e move to end of the line

• control + k deletes from current position

– Philip Sideney

“All is but lip-wisdom that wants experience.”

Now go and practise!