Syntax Coloring

The text editor can parse and distinctly color different code constructs to make them that much easier to identify on sight. As an example, the code editor window, by default, colors any code comments green. Code identifiers are black, keywords are blue, strings are red, and so on.

In fact, the number of unique elements that the text editor is capable of parsing and coloring is immense: the text editor window recognizes more than 100 different elements. And you can customize and color each one of them to your heart’s content through the Fonts and Colors section, under the Environments node in the Options dialog box. Do you like working with larger fonts? Would a higher contrast benefit your programming activities? How about squeezing more code into your viewable screen real estate? These are just a few reasons you might stray from the defaults with this dialog box.

Figure 7.6 shows the Fonts and Colors page in the Options dialog box that allows you to specify foreground and background colors for code, Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), or other elements. Select the element in the Display Items list and change its syntax coloring via the Item Foreground and Item Background drop-downs.

Image

FIGURE 7.6 Setting font and color options.


Note

We first explored this dialog back in Chapter 2, “The Visual Studio IDE.” The dialog box shown in Figure 7.6 enables you to control much more than the syntax coloring for the text editor; you can change the coloring schemes used in all the different windows within Visual Studio. The item you select in the Show Settings For drop-down determines the portion of the IDE you are customizing and alters the list of items in the Display Items list.

You can always click the Use Defaults button at the upper right of the dialog box to restore the default coloring schemes.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset