Common settings such as xcode4 installation, theme style, shortcut keys, and offline help documentation

Source: Internet
Author: User

3. Configure the fonts and colors of the Code Editor)

I prefer to write code with a black background, and my eyes are quite comfortable. In the past, the old colortheme file was not used, and the storage path of colortheme changed ~ /Library/Application

Support/xcode/color

Themes, xcode4 IN ~ /Library/developer/xcode/userdata/fontandcolorthemes, and the file format has changed, but most projects are the same. You can reconfigure the color font or manually modify the configuration file.

Google: aktowns has written a conversion script:

The usage is very simple:

1. Download dvtcolorconvert. RB. If you put it on the desktop, copy the old theme file to the desktop.

// Dvtcolorconvert. Rb

Show

Source

2. Install "plist" Ruby GEM: $ sudo gem install plist

3. Execute conversion: $ Ruby dvtcolorconvert. RB elfdart. xccolortheme
Generate elfdart. xccolortheme on the desktop ~ Restart xcode4 in/library/developer/xcode/userdata/fontandcolorthemes and

& Colors enable topic.

The converted topic file:

If you like, you can download to: http://code.google.com/p/elf-ios-resource/downloads/detail? Name = elfdark. dvtcolortheme

Iv. preferences/text editing

5. Shortcut Keys

Open key bindings preferences, copy default, and name it.

Keyboard Control: CTRL in the lower left corner of the keyboard, Ctrl, option, CMD (command, Apple spline) in sequence from left to right, Ctrl, shift, capslock, tab in sequence.

List format: function name (shortcut key, such as "modify" for manual modification, otherwise xcode4 default): Function Description


Edit menu:

Filter in Navigator

(CMD + Option + J): file filtering (Search) in the lower left corner of xcode ).

Filter in Library (CMD + Option + l ):

Library filtering (search), similar to the previous IB Library (CMD + Shift + l)
View menu:

Project

(CMD + 1): switch to the project team in the navigation area on the left of xcode, similar to the previous Groups & files.

Show

Navigator (CMD + 0): Display/hide the navigation area

Standard

(CMD + enter): for example, switch to the Standard editor view in the "Editor" in the upper right corner, and the two on the right are the assistant views (used to split the editor) version view (used to compare the version changes of the current file ).

Show debug Area

(Modify cmd + Shift + r): Display/hide the debug area under xcode. Xcode4 combines the previous debugger with the handler. The default shortcut key is the shortcut key of the previous debugger (CMD + Shift + Y ), changed to the commonly used export led shortcut cmd + Shift + R, which facilitates calling out and hiding the debugging area. The R key is easier to press than the y key.

Navigate menu:

Reveal in project navigator (CMD + Shift + J): locate the project team in the navigation area and select the file being edited.

Jump to next counterpart (CTRL + cmd + up arrow): jump to the next related file, similar to the previous switch

Header/source file (CMD + Option + up arrow), switch between the header file and the implemented file.

Editor:

Show completions (ESC or Ctrl + space): it should be the most commonly used function to display the automatic Completion list.

Re-indent (modify cmd + F8): organize code indentation (format the code style). This function is very common for me who like 8-bit tabs and neat code, it is difficult to change the habit of ALT + f8.

Comment selection (CMD +/): block comment

Fold (CMD + Option + left arrow): collapse the current block, adapt to methods, functions, and other curly brackets,/* Flower comments */, @ XX @ end, etc.

Unfold (CMD + Option + right arrow): expand the current block (if collapsed ).

Product menu:

Run (CMD + r): run directly.

Run (CMD + Option + r): run with the option.

Stop (modify cmd + Shift + enter): Stop running. It is used to xcode.

Step into (F7): One-Step follow-up

Step over (F6): skip one step

Step out (F8): One-Step Jump out

Clear Console (CMD + k): Clear the Console

Help Menu:

Quick help for selected

Item (Press and hold the option key, and then click it with the left-click button, which is the same as the version earlier than xcode): Quick help. You can click the folder icon in the upper right corner of the window to find it in the help document. you can open the header file by using the "h" icon.

Search documentation for selected

Text (CTRL + Option + cmd +/): search in the help document. The previous option + double-click is not recommended for the long combination key, we recommend option + Click to enter the document window in quick help.

Selection:

Move to beginning of document (CMD + up arrow): move the cursor to the beginning of this document

Move to end of document (CMD + down arrow): move the cursor to the end of this document.

Text Key Binding:

Most of the operations on text are the same as those on Mac OS x. for Mac OS X character operations, quick Bi is more familiar with similar skills and can be used during character generation, you can also refer to my previous tutorials <learn more about xcode>.

Save the keybindings file in ~ Under/library/developer/xcode/userdata/keybindings, you can directly download and use the shortcut keys mentioned above to modify them:

Http://elf-ios-resource.googlecode.com/files/ElfKeyBinding.idekeybindings1.0.zip

6. Offline documents

It seems that offline documents are not provided starting from xcode3. Apple's online documents are slow, making xcode downloads even worse... the solution is still the same: Let me talk about it in combination with xcode4:

1. Open xcode4 documentation

Preferences, select a library, click the info button below to view information and find the feed address, for example:

Open the source in the browser and find the latest version of xar for download (this is an error, not the latest version, but the corresponding v.38.55 version. Please note that the corresponding version must be used; otherwise, it is unavailable, I personally tested) (the file is too large. If the download tool is not installed on the Mac, it is recommended to use thunder in Windows ).

Download the file to your local computer and decompress it with xar: sudo xar-XF file. xar

Obtain the document file .doc set"

Set the file owner to devdocs: sudo chown-r-p devdocs document file .doc set.

Make sure that xcode4 is not running. Copy docset to the/xcode4 installation directory/platforms/iphoneos. Platform/developer/documentation/docsets/

(You can click the installed location directly ).

Run xcode4 to view documents offline.

VII. Locations preferences

Xcode4 puts all projects, workspace build, index, snapshots, and archives in a specific directory by default. The default value is ~ /Library/developer/xcode/deriveddata/

If you want to put the build directory under the project directory, set "build location" to "place build products in

Locations specified by tagets. Other locations are not recommended.

8. Updated in this article

1. Change the company name in the template that comes with xcode. 2011-05-10

Previously, xcode stored this information with the com. Apple. xcode configuration. The new xcode4 will be stored from the adress of Mac OS X.

To change the company name in the comment, you only need to open adress book. app and change the companyName of the current login user name.

2. How to Use automatic insert to close curly braces}

Select automatically insert closing in xcode preferences | text editing.

"}", Enter {in the code, and do not insert it immediately}. In this case, you only need to press enter to insert the right curly braces. Applicable and methods, if-Else, for, and so on.

3. Code function comments. 2011-05-10

// MARK: *** (TAG, with the same function # pragma mark ***),

// Todo :***

// Fixme:

***

//!!! :***

//??? :***

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.