Common Mac shortcut keys

1. Minimize (hide) the most advanced application ———– CMD + h

2. Exit the most advanced application ———– CMD + q

3. The selected text moves

Left/right ———- CMD + “[” or “]”

Up/down ———– opt + CMD + “[” or “]”

4. Return to the beginning/end of the line ———— CTRL + A/E

5. Go before/after the current line of text ———- CMD + left/right

6. Xcode. H and. M file switch — — — — — — — — — — — — CTRL + CMD + up/down key

7. Connect the control in Xcode to ———– opt + CMD + Enter

8.Xcode displays all code prompts ———– esc


Shortcuts for the Mac version of Eclipse

The shortcuts on the Windows computer don’t work on the Mac. Baidu a big circle, or did not find the right answer. I had to do it myself, one by one. The following results (to be added later) :

1. The code prompts ——opt + /;

2. Extraction method —— CMD + opt + m; (Select the code block first)

3. According to the method name to generate method ——— mouse up, CMD + 1;

4. Rename —– CMD + opt + r; (Select the method to rename the package operation area first)

5. Formatting (when the code layout is too messy)—- CMD + shift + f;

6. Single-line comment —— CMD + /;

—– CMD + CTRL + /; Uncomment —– CMD + CTRL + \;

8. View the source code:. Have the code —- CMD + click (or F3). —— CMD + shift + t;

9. View instance variables or methods in the source —– CMD + o;

Generate empty parameter constructor —– CMD + opt + s + Click;

. Generate the parameter constructor —– CMD + opt + s + Click;

. Generate set and get methods —– CMD + opt + s + click;

11. Copy the line ——– CMD + opt + Down/up.

—– CMD + shift + o;


Terminal command line in Mac

Terminal is used a lot of times, must use 6 fly up.

1. Open terminal ———- CMD + space + ter

2. Change the path

A. Switch to the desktop ———- CD space./desktop

B. Switch the specific absolute path ———- CD space XXX (XXX is generated by dragging the target file here)

C. Switch to the previous layer ———- CD.. /

3. View the current path ——— PWD

4. Create a file ———– touch XXX

5. View the ———– ls file in the current directory

6. View the entered record —————– history

7. Clear the screen (not really clear, but move the content up) ———— Clear or CTRL + L

8. Terminate the current command ————— CTRL + C

9. Open the current path ——————– open space.

10. Instructions for a certain command —————– man XXX

11. Edit a file

A. Open a file in the current directory ————— vim(vi) space XXX

B. Start editing —————- I

C. Save the Settings and exit ————-. Press ESC

:wq Save the configuration and exit vi. If the value is :wq! Forcible save exit (common)

:w Save but not exit (common)

:w! If the file property is Read-only, the file is forcibly written to

:q leaves vi (common)

:q! If you have modified the file and do not want to save it, use it! Do not store files for forced leave.

:e! Restore the file to its original state!

12. Other display instructions

A. Date ————— date

B. Calendar —————– CAL

C. Computer IP address ————- ifconfig space en0

D. Check the network status ————— ping space XXX (IP address)

E. Find the path of a file ———– find space desktop space -name “XXX”


RAR and video player default Settings

No other, is to facilitate their own record, do not spray.

1. Many files compressed from A Windows PC cannot be opened directly on a MAC. You need to download some auxiliary software, and I recommend using one as follows:





2. Similarly, some video files sometimes require special players to play. So how to change the default state of the previous player?

Step 1: Select a video file (do not play it), then press CMD + I to pop up a default player information. Step 2: We just change to the player we want, and then click “Replace all”.


View the contents of the JAVA JDK

Enter /usr/libexec/javA_HOME -v on the terminal. Ps :” -v “is bigger.