Common shortcut keys for Mac and Xcode

Source: Internet
Author: User

Exposure to the MAC for so long, feel that the most humane Mac, the most difficult to detect there are two places, the first is the MAC keyboard key command is left-handed thumb control, our thumbs can be easily and naturally hold command button, shortcut key combination operation, While the Windows keyboard, control as the core button, but is controlled by the little finger, how uncomfortable operation is not much of the groove. There is also a bright spot is that when there are two pages, we put the focus of the mouse on the back page, in this case can also be through the trackpad or mouse scrolling, scroll up and down to view the contents of the following pages. is not a lot of people in the back of the page to put a novel, no matter when secretly happy ah?

Why the front of the point, say the command button, because many friends are in the Mac mini development of iOS programs, the tragedy is that we configured the keyboard is a Windows keyboard, this time the default command is not in our familiar position, and then we have to stretch the finger, Looking down at the button, it really delayed time. Rest assured, I tell you how to change the command to our familiar thumb next to it, look,

In fact, the option and command associated with the key exchange, and then reiterated that the method is for the use of Mac Mini, equipped with the Windows keyboard users, Mac book Pro and other users do not modify .

Let's start by introducing the shortcut keys that Mac uses!

First, Mac common shortcut keys

1. Modify the name of the file or folder---Just press ENTER

2, command+c--copy command+v--paste, is a code farmers know. Note below the Mac, Command+x does not cut the file, the folder function, I also want to know cuts the file, the folder shortcut.

3, command+tab--from the current application of the page switch to another application of the page, such as from Xcode to Safiri switch, I feel that there is no way to switch between different pages of the same application, which is a bit worse than Windows. But fortunately the Mac has sharp split screen operation, but the user's personal preferences, will be mentioned later.

4, command+space--switch Input method, the Chinese input of Apple does not seem to support the phrase memory, it is recommended to download Sougou Input method for Mac, it is really useful.

5, command+shift+esc--Task Manager, you can quickly force close the application.

6, open the Finder case, command+shift+g, through the absolute path to access the folder, such as the ~/repository/developer/xcode/deriveddata/, this way can also access the hidden folder.

7, Command+q, exit the current application.

8, Command+w, close the current application (or a page of the current application, such as a page in Safiri).

9, Command+shift+n, in the case of Finder Open, create a new folder.

10, Commad+a, select all files and folders.

11, Command+delete, delete files or folders.

Here are a few handy shortcuts on the browser,

12. Command+n, create a new file or open a browser in a new window.

13, Command+t, open a new browser tab.

14, Command+l, in the browser (Safiri, Chrome ... The cursor quickly navigates to the address bar when it is turned on.

OK, the above shortcut key basically satisfies the need of Mac operation, why do I also have to add some shortcut keys above the browser? Because I think that as a programmer, working with a few simple tools can be--mac system platform, a satisfying browser, Xcode and some other common development tools such as versions, Smartgit and other version control tools. The shortcut keys mentioned above are the basis for quick operation of Xcode, and I will list some of the shortcuts used by Xcode to improve the speed of development. May be updated with the content, will provide some of the skills of Xcode use, not all are shortcut keys, if you Gaofu have more sharp, fast xcode use skills, must also share with me, I first say a thks.

15, (20140415) in the browser command+ the mouse click the link, opens the webpage in the new window. This time without the right mouse button, from the speed and operability, a lot of improvement.


Xcode uses the following shortcut keys:

1. Shortcut keys on the left menu

The above a total of 8 optional menu, commonly used is 1, 3, 4, 7, of course, this is my own personal commonly used several options, there are four actually have a great effect, but I now this level, temporarily still not use. 1, 3, 4, 7 corresponding functions are: 1-file Lookup, 3-Global search keywords, 4-view all red errors or yellow warning, 7-View all breakpoints. We can click through the mouse to select, but there are keyboard shortcuts, respectively, is command+1, command+3, Command+4, command+7, in fact, the most commonly used is command+1, Because we write a long time code when suddenly want to see the content of a file, this time you can use command+1 jump to the file Search menu, and then command+option+j the cursor to the input box, such as,

Yes, it is the thumb at the same time press the Command+option button, and then press J, you can quickly locate the input box, search for the file you want to view.

2, Command+n, new file

3, Command+shift+n, create a new project. For example, you read a tutorial online, eager to create a new project to try.

4, Command+b, compile the code. We write a time code, compile it first, and see if there are any grammatical errors, which is a good habit. In fact, in the process of Xcode running the project, through a few stages, compile-and-link, build the target file, I understand it is not deep enough to say.

5, Command+r, run the project, you do not have to run the mouse to the upper left corner to point button.

6, command+. (point), interrupt the operation of the project.

7, ESC, the code of automatic prompt and complete, the project stopped running state, that is, when there is no run, command+. (points) can also automatically prompt and code completion.

8, command+/, comment code.

9, command+←, the cursor focus jumps to the front of our code, command+→, the cursor focus jumps to the end of our code.

10, command+shift+→, select all the code content before the cursor, command+shift+→, select all the code content after the cursor.

11, Command+↑ (↓), the cursor focus runs to the top (bottom) side.

12, Shift+↑ (↓), select the above (below) line of code, press ↑ (↓) consecutively, is to select multiple lines.

13, Command+shift+k,clean project, clean effect is like a person tired for a whole day, and then lie in the temperature suitable pond inside good bubble a bath, the body of garbage, toxins are discharged. After compiling and running the project many times, remember that Clean,xcode is also like people, and will feel tired and bloated.

14, Command+k, clear the console console content, because sometimes we need to print some variables in the console, to observe the operation of the code.

15. Command+f, search for keywords in this page.

16, command+shift+f, search the whole page of keywords, this is very useful, your search interface display text content, you can locate the page to write files. This is actually the same effect as commad+3, but command+shift+f is more convenient and easier to understand.

17, Command+0, Hide (expand) the left side of the menu bar, effects such as,

This usage scenario is when you reference someone else's code to write code, because the left navigation bar exists, resulting in the editing interface is too small, this time to hide the left navigation bar, increase the editing area.

18, Command+l, enter the number of rows, quickly navigate to the current page of the specified number of rows. Sometimes update the code base code, but sometimes conflict or something, we see our 1000th line is wrong, this time we can talk to colleagues, you look at the 1000th line of xxx file is what, I have a conflict here, to compare with you. You will use the command+l, you do not have to desperately roll the mouse scroll.

19, Command+shift+j, quickly find the location of the current editing file in the project file structure. The premise of using this is that you cannot enter text in the input box in the file Search menu, because if you have entered View1controller in the input box and you are editing VIEW2CONTROLELR, use command+shift+ J must not quickly find the location of the file.

20, command+control+← (→), display the previous (next) file content.

21. Command+control+↑ (↓) to switch between. h and. m files.

22, Command+s, save.

23, Command+z, undo the previous operation; In contrast, command+shift+z, undo the reverse operation of the operation, this combination shortcut is very useful, when you undo some code, but you realize that your revocation of the code is valid, and at this time you forget to write the steps, Then command+shift+z help you get it back.

24, in the search status Command+f, press ENTER, search for the next keyword; command+shift+g, search for the previous keyword.


Common shortcut keys for Mac and Xcode

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.