Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
171 views

Xcode Cheat Sheet: Search Navigation Editing

This document provides an Xcode cheat sheet that lists keyboard shortcuts for common tasks like navigation, editing, debugging, and version control. It also provides tips for using Xcode like opening files quickly, creating custom code snippets, using tabs to organize workspaces, and configuring behaviors to customize Xcode's responses to certain events. The document recommends the Git client Tower for more advanced version control features beyond what Xcode provides on its own.

Uploaded by

Momar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views

Xcode Cheat Sheet: Search Navigation Editing

This document provides an Xcode cheat sheet that lists keyboard shortcuts for common tasks like navigation, editing, debugging, and version control. It also provides tips for using Xcode like opening files quickly, creating custom code snippets, using tabs to organize workspaces, and configuring behaviors to customize Xcode's responses to certain events. The document recommends the Git client Tower for more advanced version control features beyond what Xcode provides on its own.

Uploaded by

Momar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

XCODE CHEAT SHEET

presented by Tower - the best Git client for Mac and Windows

SEARCH NAVIGATION EDITING


Find in File ⌘ F Open Quickly ⌘ ⇧ O Show Assistant
Move Focus to Editor ⌘ J Editor ⌘ ⌃ ⌥ RETURN
Find & Replace
in File ⌘ ⌥ F Hide Assistant
Next Counterpart ⌘ ⌃ UP
Editor ⌘ RETURN
Find in Project ⌘ ⇧ F Previous
Find & Replace Counterpart ⌘ ⌃ DOWN Canvas View ⌘ ⌥ RETURN
in Project ⌘ ⌥ ⇧ F Next Toggle Completions ⌃ SPACE
Recent File ⌘ ⌃ RIGHT
Previous Edit All in Scope ⌘ ⌃ E
TABS Recent File ⌘ ⌃ LEFT Indent Selection ⌘ ]
Definition of Symbol ⌘ ⌃ click Outdent Selection ⌘ [
New Tab ⌘ T Go to Line ⌘ L
Fix Indentation ⌃ i
Previous Tab ⌘ } Fold Section ⌘ ⌥ LEFT
Comment / Uncomment ⌘ /
Next Tab ⌘ { Unfold Section ⌘ ⌥ RIGHT
Move Line Up ⌘ ⌥ [
Move Line Down ⌘ ⌥ ]

NAVIGATOR DEBUGGING UTILITIES


Show / Hide ⌘ 0 Toggle Debug Area ⌘ ⇧ Y Show / Hide ⌘ ⌥ 0
Switch Tabs ⌘ 1–9 Next Issue ⌘ ' Switch Tabs ⌘ ⌥ 1–9
Open File in Previous Issue ⌘ "
Assistant Editor ⌥ click Add Breakpoint ⌘ \
BUILD & RUN
Decide where Toggle Breakpoints ⌘ Y
to Open File ⇧ ⌥ click
Clear Console ⌘ K Build ⌘ B
Run ⌘ R
DOCUMENTATION Stop ⌘ .
Analyze ⌘ ⇧ B
Show Documentation ⌘ ⇧ 0 Help for Clicked Symbol ⌥ click
Test ⌘ U
Documentation for
for Selection ⌘ ⌥ ⌃ / Clean ⌘ ⇧ K

30-day free trial available at


The best Git Client for Mac & Windows www.git-tower.com
XCODE TIPS & TRICKS
presented by Tower - the best Git client for Mac and Windows

1 . OPEN QUICKLY 4. TABS


You shouldn’t waste your time digging for a file in your folder Tabs are well-known from almost every IDE and text editor.

hierarchy. Instead, you can use Xcode’s “Open Quickly” dialog However, three things make tabs in Xcode especially powerful:

by pressing ⌘ ⇧ O . Simply start typing any part of a a) You can configure each tab individually. For example, one
file’s name — it doesn’t even have to be consecutive letters: tab could contain just two editor panes, while another one
“mwinco” will find your ”MainWindowController” class. could contain the project navigator, a single editor pane, and
the utilities area. Thereby, you can configure tabs that are
Additionally, if you hold down ⌘ ⌥ ⇧ while double-clicking
optimized for different use cases (like coding, debugging,
a file, you can choose in which editor pane the file should open.
interface builder tasks, …).

b) Tabs are persisted in a workspace. When opening the pro-


2. CUSTOM CODE SNIPPETS
ject again, Xcode restores the tabs - including their unique
Whenever you find yourself typing the same bits of code mul- structure. This makes it worth while to take some time to
tiple times, you should create a code snippet. To do that, select configure your “perfect” setup.
the code fragment that will soon be a custom snippet in the c) By pressing ⌘ ⌥ ⇧ T , you can assign it a name.
editor. Then right-click the selection and choose „Create Code Named tabs can then be used in “Behaviors” (see below).
Snippet“ from the contextual menu.

Besides naming your new snippet, you should also define a


“Completion Shortcut”: when you type these letters later, 5. BEHAVIORS
Xcode will offer to substitute them with your custom snippet.
With “Behaviors”, you can tell Xcode how to react when certain
If you want to edit your snippet later at any time, simply open events happen. For example, you could have the console view
the “Library” pane ( ⌘ ⌥ L ) and select the „Snippets“ shown whenever your app starts running; or you could have a
library. new tab opened whenever you start a search.

This becomes even more powerful when combined with named


3. VERSION CONTROL tabs. For example, whenever your app pauses, you can have
Xcode open your named tab “Debug” - a tab that you configu-
If you want to go beyond Xcode’s basic version control support,
red exactly how you want it to look (maybe with an assistant
you can combine it with Tower, a Git desktop client for Mac and
editor and the debugger shown, but the project navigator
Windows. From Interactive Rebase to Reflog and from Pull
hidden…).
Requests to Submodules: many of Git’s advanced features are
then easily accessible! Behaviors can be configured in Xcode’s preferences window.

KEYBOARD SYMBOLS

⌘ Command key ⌥ Option (alt) key

⌃ Control key ⇧ Shift key

VERSION CONTROL
Go beyond Xcode‘s basic version control support and combine it with Tower — the most powerful Git client for Mac. Try it free for 30 days.

30-day free trial available at


The best Git Client for Mac & Windows www.git-tower.com

You might also like