Try   HackMD

Xcode Keyboard Shortcut List

Xcode(Version 10.0)常用快捷鍵列表
(太多不及備載~其他可用 "⌘+," 查詢)

(如果想要客製化 key binding 可以參考下面的連結)
(可能會依據Xcode版本不同而有所差異)


Symbol

Symbol Name
Command
Control
Option/Alt
Shift
Return/Enter
Tab
Escape
↘︎ Xcode: fn + →

General

Key Command Note
⌘+, Preferences
⌘+⇧+0 Documentation zero 0
⌘+? Quick help

ToolBar

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

- Build & RUN

Key Command Note
⌘+B Build
⌘+⇧+B Analyze
⌘+⌃+B Compile file
⌘+R Run
⌘+⇧+K Clean build
⌘+⌃+R Run without building
⌘+. Stop

- Test

Key Command Note
⌃+⌥+⌘+G Test Again 重跑上次測試範圍, TDD時好用
⌃+⌥+⌘+U Test 只跑目前游標測試項目

- Schema Menu

Key Command Note
⌃+0 Choose Scheme zero 0
⌃+⌘+[ or ] Select Scheme
⌃+⌥+⌘+[ or ] Select destination

- Editor & Workspace Configuration

Key Command Note
⌘+⇧+L Open snippets or objects
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
⌘+⏎ Standard editor
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
⌘+⌥+⏎ Assistant editor
⌘+⌥+⇧+⏎ Version editor
⌘+T Create tab
⌘+⇧+[ or ] Switch tab

Key Command Note
⌘+0 Toggle navigator area zero 0
⌘+(1-9) Switch navigators
⌘+⌥+J Filter in navigator

- Find

Key Command Note
⌘+⇧+F Search in the whole project
⌘+⌥+F Search & replace in the whole project
⌘+⌃+⇧+H Find call hierarchy 維護和追蹤Code時好用

Inspector Area

Key Command Note
⌥+⌘+0 Toggle inspector area zero 0
⌥+(1-6) Switch inspectors

Debug Area

Key Command Note
⌘+⇧+Y Toggle debug area
⌘+⇧+C Activate console
⌘+K Clear console
⌘+⌥+K Reload console
⌘+\ Add breakpoint
⌘+Y Deactivate breakpoints
⌘+⌃+Y Continue / Pause debug
F6 Debug step over

Editor Area


- File Navigation

Key Command Note
⌃+⌘+← or → Navigate - Go forward / back
⌃+5 Show group file 在Jump bars上顯示
⌃+6 Show document item 在Jump bars上顯示,可輸入搜尋
⌘+⇧+O Search/Open file quickly English's o, not zero number 0
⌘+⌥+,
Or ⌘+⇧+O followed by ⌥+⏎
Open file is Assistant Editor

- Code(Navigate & Editor)

Key Command Note
⌃+⌥+⌘+F Fix all issues
⌘+L Jump to line in file
⌃+⌘+E Edit all in scope / refactor renaming a variable or function
⌥+⌘+E (⇧+⌥+⌘+E) Select next/previous occurrence
⌘+J Move focus to editor Move To Editor View
⌃+⌘+Click
Or ⌃+⌘+J
Jump to definition
⌃+⌘+?
Or ⌥+Click
Documentation for selected text

Or ⌥+⎋
Show completion list Or ⌃+space
⌃+space Show completions Editor menu for source code
⌥+⌘+[ or ] Move line up / down
⌥+⌘+← or → Fold / Unfold Xcode: Editor -> Code Folding
⇧+⌥+⌘+← or → Fold / Unfold all

Swift UI

Key Command Note
⌘+⌥+P Resume automatic previews Swift UI Preview 繼續執行
⌘+⌥+⏎ Toggle canvas


Other

Key Command Note
⌥+⌘+← or → 將游標移到一個字的開頭或結尾 +⇧則反灰選擇一個字
fn+delete
⌃+D
在沒有往前刪除鍵的鍵盤上執行往前刪除
⌥+delete
⌃+delete
Delete one word at time 一次向左刪除一個單詞
⌘+delete Delete one sentence at time 一次向左刪除一行
⌘+← 跳到游標那行的開頭
⌃+A 跳到一整句的開頭
⌃+\ Jump to next change 移動游標至下一個編輯的位置
可循環切換
⌃+I Jump to previous change 移動游標至上一個編輯的位置
可循環切換
⌃+I Select all and re-indent.(same with previous) 自動縮排或排版
⌃+⌘+Q Lock Mac 鎖定螢幕
⌃+⌘+Space bar Emoji, character viewer 打開字元顯示器
⌘+⇧+3 take a screenshot 螢幕全景截圖
⌘+⇧+4 capture a portion of the screen 部分截圖
⌘+⇧+4+Space bar capture a window or menu 視窗截圖
⌥+⌘+⎋ force an app to quit 強制結束


Reference resources:

Application App

tags: Xcode Shortcut