Mac and Xcode shortcut keys
The following are some shortcuts I have summarized:
Shortcuts in Xcode
1. File
CMD + N: New File
CMD + SHIFT + N: new project
CMD + O: Open
CMD + S: Save
CMD + SHIFT + S: Save
CMD + W: Close the window
CMD + SHIFT + W: Close the file
2. Edit
CMD + [: Left indent
CMD +]: Right indent
CMD + CTRL + LEFT: Fold
CMD + CTRL + RIGHT: unhide
CMD + CTRL + TOP: collapse all functions
CMD + CTRL + BOTTOM: cancel all function folding
CTRL + U: cancel all collapse
CMD + D: Add bookmarks
CMD +/: comment or cancel the comment
CTRL +.: parameter prompt
ESC: Automatic prompt list
3. debugging
CMD + \: set or cancel a breakpoint
CMD + OPT + \: Allows or disables the current breakpoint
CMD + OPT + B: View All Breakpoints
CMD + RETURN: Compile and run (determine whether to enable breakpoint Based on settings)
CMD + R: Compile and run (do not trigger breakpoint)
CMD + Y: Compile and debug (trigger breakpoint)
CMD + SHIFT + RETURN: stops running or debugging
CMD + B: Compile
CMD + SHIFT + K: Clear
4. Form
CMD + SHIFT + B: compilation window
CMD + SHIFT + Y: debugging code window
CMD + SHIFT + R: Debugging Console
CMD + SHIFT + E: Adjust the main editing window
5. Help
CMD + OPT +? : Development Manual
CMD + CTRL +? : Quick help
Command + Shift + E: Extended Editor
Command + [: shift left code block
Command +]: Right Shift code block
Tab: receive code prompts
Esc: displays the code prompt menu
Ctrl +. (period): Circular browsing code prompt
Shift + Ctrl +. (period): returns the code prompt for reverse loop browsing.
Ctrl +/: Move to the next placeholder in the code prompt
Command + Ctrl + S: Create a snapshot
Ctrl + F: move the cursor forward
Ctrl + B: move the cursor behind
Ctrl + P: move the cursor to the top row
Ctrl + N: move the cursor to the next row
Ctrl + A: move the cursor to the beginning of the line
Ctrl + E: move the cursor to the end of the row
Ctrl + T: swap the characters on both sides of the cursor
Ctrl + D: Delete the character on the right of the cursor
Ctrl + K: delete this row
Ctrl + L: place the insert point in the center of the window
Command + Alt + D: show the open quickly window
Command + Alt + direction key: Open the supporting file
Command + D: Add bookmarks
Option + double-click: search in the document
Command + Y: run the program in debug mode
Command + Alt + P: Continue (in debugging)
Command + Alt + 0: Skip
Command + Alt + I: Jump
Command + Alt + T: Jump out
Some shortcut keys in mac
1. The following shortcut keys are common shortcut keys at the system level:
Command + A: select all
Command + C: Copy
Command + V: Paste
Command + X: Cut
Command + Z: undo
Shift + Command + Z: undo the previous "undo" Action
Up/Down/Left/Right: move the cursor to (top/bottom/Left/Right) (one character/line)
Option + Left/Right: move the cursor to a word (before/after) (the word cannot be recognized when processing Chinese characters, no difference from Left/Right)
Commandmand + Left/Right: move the cursor to the beginning/end of the line
Option + Up/Down: move the cursor to the beginning/end of this segment
Command + Up/Down: move the cursor to the beginning/end of the document
3. How to Select text:
Click at the beginning, and then press Shift to click at the end;
Click twice at the beginning, drag the pointer to the end, and click;
Press the Shift key and press the up or down key (you can also use it with Option or Command)
Double Click: Double-Click to select the word where the cursor is located;
Triple Click: double-Click the section where the cursor is located (this is important)
4. Excluding text:
Delete: A character before the cursor is exceeded.
Fn + Delete: Delete a character after the cursor
Option + Delete: Delete a word before the cursor
Fn + Option + Delete: Delete a word after the cursor
Command + Delete: Delete the content from the cursor to the beginning of the line
Control + K: Delete the content from the cursor to the end of this section
Control + Y: paste the content deleted with Control + K or Command + Delete to the position where the cursor is located.