Setting coding preferences – Adobe Dreamweaver CC 2014 v.13 User Manual
Page 88
Setting coding preferences
About coding preferences
Set the code appearance
Change the code format
Set the code rewriting preferences
Set the code colors
Use an external editor
Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this
article in Dreamweaver CC and later. For more information, see
.
About coding preferences
You can set coding preferences such as code formatting and coloring, among others, to meet your specific needs.
Note: To set advanced preferences, use the Tag Library editor (see Managing tag libraries).
Set the code appearance
You can set word wrapping, display line numbers for the code, highlight invalid code, set syntax coloring for code elements, set indenting, and
show hidden characters from the View > Code View Options menu.
1. View a document in Code view or the Code inspector.
2. Do one of the following:
Select View > Code View Options
Click the View Options button
in the toolbar at the top of Code view or the Code inspector.
3. Select or deselect any of the following options:
Word Wrap Wraps the code so that you can view it without scrolling horizontally. This option doesn’t insert line breaks; it just makes the
code easier to view.
Line Numbers Displays line numbers along the side of the code.
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 code colors.
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
81