O'Reilly logo

Professional Xcode® 3 by James Bucanek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Syntax-Aware Editing

WHAT'S IN THIS CHAPTER?

  • Using and customizing syntax coloring

  • Folding code blocks

  • Accepting code completion suggestions

  • Inserting text macros

In Chapter 6, you learned a lot of editing features specifically designed to make writing source code easier, but most of these features are just textual aides that know little or nothing about your code and symbols.

Xcode's syntax-aware features pick up where the basic text editing aides leave off — with some overlap between them. Syntax-aware editing means that the editor analyzes your source code and uses that knowledge to highlight your code's structure and symbols, offer suggestions, and make intelligent changes.

You've already encountered a few syntax-aware features. The Balance command, which finds a matching brace or bracket, understands the block structure, string format, comment syntax, and other details of your programming language.

This chapter describes the various syntax-aware editing features and tools available in Xcode. Xcode can know a lot about your code's structure, and its vocabulary is quite broad; it understands languages from ADA to XML. The code analysis is performed continuously and in the background. It won't get in the way of your development, and it's almost always up-to-date.

CODE SENSE

Code Sense is the technology that analyzes your code continuously while you write it. It assembles and maintains a database, called the Code Sense index, of the classes, variables, methods, functions, structures, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required