beautypg.com

Change the code format – Adobe Dreamweaver CC 2015 User Manual

Page 371

background image

364

Coding

Last updated 6/3/2015

Hidden Characters

Displays special characters in place of white space. For example, a dot replaces each space, a

double chevron replaces each tab, and a paragraph marker replaces each line break.

Note: Soft line breaks that Dreamweaver uses for word wrapping are not displayed with a paragraph marker.

Highlight Invalid Code

Causes Dreamweaver to highlight in yellow all HTML code that isn’t valid. When you select

an invalid tag, the Property inspector displays information on how to correct the error.

Syntax Coloring

Enables or disables code coloring. For information on changing the coloring scheme, see

Set the

color theme for Code View

.

Auto Indent

Makes your code indent automatically when you press Enter while writing code. The new line of code

indents to the same level as the previous line. For information on changing the indent spacing, see the Tab Size
option in

Change the code format

.

Change the code format

You can change the look of your code by specifying formatting preferences such as indentation, line length, and the case
of tag and attribute names.

All the Code Format options, except the Override Case Of option, are automatically applied only to new documents or
additions to documents that you subsequently create.

To reformat existing HTML documents, open the document, and select Commands > Apply Source Formatting.

1

Select Edit > Preferences.

2

Select Code Format from the Category list on the left.

3

Set any of the following options:

Indent

Indicates whether code generated by Dreamweaver should be indented (according to the indentation rules

specified in these preferences) or not.

Note: Most of the indentation options in this dialog box apply only to code generated by Dreamweaver, not to code that
you type. To make each new line of code that you type indent to the same level as the previous line, select View > Code
View Options Auto-Indent option. For more information, see

Set the code appearance

.

With

(Text box and pop-up menu) Specifies how many spaces or tabs Dreamweaver should use to indent code that

it generates. For example, if you type 3 in the box and select Tabs in the pop-up menu, then code generated by
Dreamweaver is indented using three tab characters for every level of indentation.

Tab Size

Determines how many characters wide each tab character appears in Code view. For example, if Tab Size

is set to 4, then each tab is displayed in Code view as a four-character-wide blank space. If, additionally, Indent With
is set to 3 Tabs, then code generated by Dreamweaver is indented using three tab characters for every level of
indentation, which appears in Code view as a twelve-character-wide blank space.

Note: Dreamweaver indents using either spaces or tabs; it doesn’t convert a run of spaces to a tab when inserting code.

Line Break Type

Specifies the type of remote server (Windows, Macintosh, or UNIX) that hosts your remote site.

Choosing the correct type of line break characters ensures that your HTML source code appears correctly when
viewed on the remote server. This setting is also useful when you are working with an external text editor that
recognizes only certain kinds of line breaks. For example, use CR LF (Windows) if Notepad is your external editor,
and use CR (Macintosh) if SimpleText is your external editor.