Code collapse
Code collapse is the focus of the next group of buttons in the Coding toolbar. Code collapse allows you to
hone in on your work by temporarily condensing specific sections of the code into a single line or, alternately,
condensing all but the selection. Hover your cursor over the collapsed element to see the first 10
lines of code in a tooltip (see Figure 6-14).
177
Accessing the Code Directly 6
FIGURE 6-14
Code collapse lets you concentrate on just the code you??™re working on, while keeping the hidden code accessible
via tooltips.
The three buttons in this group work in concert with your cursor position and selection in Code view:
n Collapse Full Tag: Expands the current selection or cursor position to the immediately surrounding
tag and collapses the code.
n Collapse Selection: Reduces the current selection to a collapsed single line.
n Expand All: Extends all condensed portions of code in the current document.
Any code marked as collapsed retains that state after it has been saved, closed, and re-opened. If you press
Alt (Option) while clicking either Collapse Full Tag or Collapse Selection, Dreamweaver inverses the normal
collapse operation. For example, if your cursor is placed in a
tag and you press Alt (Option) while
clicking Collapse Full Tag, all the code outside of the current