Text and text explanations use of common xcode shortcuts

Source: Internet
Author: User

When I first started using xcode, did I find that no shortcut keys were available for familiar development environments? How to quickly run, stop, edit, and so on are all different. Quickly Master these shortcuts to provide development efficiency.

In fact, the shortcut keys are marked in the toolbar of xcode, but some symbols do not match the symbols on your keyboard. The shortcut keys in the toolbar below summarize the usage of common shortcut keys.

 

I. About running debugging

1. Running and stopping are all in the product on the toolbar.

Command + R run.

Command +. Stop

 

2. One-Step F6 debugging, F7 jump, F8 continue, similar to eclipse,

 

Ii. Navigation

This is the shortcut key in the navigation

Here, I want to explain that some people may not know what the symbol represents. We all know that the spline is the command key, and how many other keys can't be found on the keyboard? Don't worry, see the figure:

In fact, they are commonly used options, control, shift keys.

 

1. Switching header files and M. Files is very practical.

Command + Control + up and down arrow keys

 

2. Go back: Back up. Why? Back to the page you opened last time.

Control + command + left arrow

Go forward back to the page you opened

Control + command + right arrow

Iii. File

Create Project command + Shift + n
Create FILE command + n
Create an empty file command + Control + n
Open command + O
Close Window command + W
Save all files: Command + Option + S
Restore to the saved State Command + u

 

  4. Edit the code1. Code indent

Left indent command + [
Right indent command +]

2. Code Edit Control-F: one character to the right (forward)
Control-B: one character to the left (backward)
Control-P: Previous)
Control-N: Next line)
Control-A: Beginning of a row
Control-E: End)
Control-T: transpose)
Control-D: Delete the character on the right of the cursor)
Control-K: Delete the remaining characters of the row (kill) 3. SEARCH Command + F in the document: SEARCH Command + G: Search next place
Shift + command + G: Search for the previous position

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

Below are some useful shortcut keys(From http://www.cppblog.com/brucejini/archive/2010/12/24/137367.html)


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 line -- Yang Guo Note: These two are very useful. xcode was just used, why can't the home and end keys be directly located at the beginning and end of a 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


Below are some other shortcut keys for Mac
(From http://www.chinamac.com/2009/0621/46775.html)

Go)
Control-F2 To menu
Control-F3 To Dock
Switch)
Command-Tab Switch between programs
Command -' Switch between windows in the program
Window)
Command-H Hide
Command-m Minimize
Command-n New
Command-o Open
Command-P Print
Command-Q Exit
Command-Q Exit
Command-W Close
F9 Display windows opened by all programs
F10 Display the current window
F11 Hide all windows and display desktops
File)
Command-S Save
Command-shift-S Save
Command-shift-n Create folder
Command-I Introduction
Command-Option-I Show introduction to multiple projects
Move)
Home Move to the beginning of the file
End Move to the end of the file
Command-submit Move to the beginning of a row
Command-→ Move to end of line
Option-Encoding Move a word to the left
Option-Encoding Move a word to the right
Select)
Shift-home Start with file
Shift-end Select end of File
Shift-command-Detail Select to the beginning of the line
Shift-command-→ Select to end of line
Shift-Option-ignore Select a word from the left
Shift-Option-ignore Select a word to the right
Edit)
FN-backspace Delete the character after the cursor
Finder
Space Quick look
Command-delete Delete
Command-delete-shift Clear garbage bins
Command-shift- Go to the application directory
Command-shift-C Go to the computer directory
Command-shift-H Go to the home directory
Command-shift-B Transfer files via Bluetooth
Screen)
Control-shift-eject Screen sleep
Command-shift-3 Capture the entire Screen
Command-shift-4 Intercept a specified region
Command-option -- Zoom out
Command-Option-= Zoom in
Command-Option-control-8 Switch the screen from white to white"
Command-Option-Ctrl-> Increase contrast
Command-Option-Ctrl-< Contrast reduction
System)
Command-Option-escape Force exit Program
Command-Option-eject Sleep
Command-control-eject Close all programs and restart
Command-space Switch Language
Command-ESC Front row
Command -? Get help
Command-F5 Open/close voiceover (read menu, button, etc)
Volume (volume)
Shift-volume Adjust the volume but do not make a prompt
Option-volume Enable "sound" system preset"
Shift-Option-volume Fine-tune the volume (the original 16 style sections are refined to 64 cells)
Others)
Command-shift-y Generate a note with the selected text


Inaccessible shortcut keys for OS X text editing
(From http://www.ib66.net.cn/bbs/view/id-39)


Word processing is the most common task for computers. In the process of word processing, skillful use of a variety of shortcut keys has a decisive significance to improve work efficiency. (Taking any software, even the operating system, to study its shortcuts is the best habit of working with a computer .)

The following describes the portable keyboards (without f13 ~ F15, No keypad ).

1. The following shortcut keys are general shortcut keys for "system-level":

Command +: Select all
Command + c: Copy
Command + V: Paste
Command + x: Cut
Command + z: Undo
Shift + command + z: Undo the "undo" Action 2.

2. move the cursor in the text input area:

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) ("word" cannot be recognized when processing Chinese, no difference with 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. method of selecting text:

Click at the beginning, and then pressShiftClick the key at the end;
Click twice at the beginning, drag the pointer to the end, and click;
PressShiftPress the upper and lower right keys (can also be usedOptionOrCommandUse)
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. Remove text:

Delete: Remove a character before the cursor
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

The following three shortcut keys are very useful:

Command + Delete: Delete the content from the cursor to the beginning of the line
Control + k: Delete content from the cursor to the end of this section
Control + Y: Will be used just nowControl + kOrCommand + DeletePaste the deleted content to the cursor

There is also an interesting and useful shortcut key,Control + T: Change the positions of two subtitles before and after the cursor. However, the fit Chinese Input Method sets this key to "simple and Traditional Chinese Input Switch". Therefore, this shortcut key cannot be used when the Chinese input is activated.

5. Spelling tools

Shift + command +;Call up the spelling check dialog box.

F5Complete the current word. In the textedit program, you can also useESCView spelling suggestions. (The cursor should be placed after an English letter)

6. Rich text editing

Plain text files (txt) are not formatted, but rich texts (such as RTF) are in various formats, and the shortcut keys for setting the format are basically common:

Command + B: Increase
Command + I: Skew
Command + u: Underline

Command ++: Increase the font size
Command +-: Reduce the font size

Command + {: Left
Command +}: Right
Command + |: Center

Control + command + u: Convert selected text to upper case)
Control + command + L: Convert selected text to lower case (lower case)
Control + command + c: Converts the first letter of the selected text to capitalize)

Command + k: Insert hyperlink

Shift + Option + command + V: Paste in the format of the cursor

7. Search in the document

Command + F: Search
Command + G: Search next location
Shift + command + G: Search for the previous position

8. Enter special characters

OptionAndShift + OptionThis function key can be combined with other single keys and can be entered with a variety of special characters 3:

Key table after option is pressed

Key table after pressing SHIFT + Option

9. fit Chinese Input Method

Shift: Switch between Chinese and English
Command + Space: Switch Input Method
Shift + Space: Full-width character Switching
Control +.: Chinese and English Punctuation Switching
Control + T: Switch between simple and Traditional Chinese Input

Although the fit input method has stopped development and is maintained independently by tianyu263, it is still a "enough" input method. Like all modern input methods, it has the ability to "automatically learn" based on user input (that is, to automatically remember users' choices ). For example, if you select a "Custom Vocabulary" and enter the same pinyin, the "Custom Vocabulary" will be ranked first. However, sometimes you may accidentally enter an error. For example, if you want to enter a "Custom word", you can enter a "Custom word". Then, once you enter this pinyin, the "custom meeting" will be ranked first. In this case, do not press "space" or "enter", but pressOption + 1: Delete this "wrong memory" and select the correct one again:

Finally, for the use of the "desktop keyboard", see the article "cocoa text system-default Mac OS x system key bindings" 4 I found on the Harvard University website.

  1. However, I wonder why most documents that introduce shortcuts are not classified by function, but are arranged alphabetically? [?]
  2. As a user transferred from windows, it took a while to find this key combination ...... [?]
  3. I couldn't cut out the option-based keyboard picture of my MacBook, so I had to find a desktop keyboard picture online. [?]
  4. The last two are also from this article.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.