Copy link to clipboard
Copied
I am using DW 21.3, Build 15593 on an iMac. When I use tag autofill by typing the tag name and hitting the tab key, the closing the angle brackets and closing tag are entered correctly. But when I hit the return key to add a line space the closing tag just drops to the line below with the same indent. I have to hit return followed by the tab key to create a blank line with the proper indent for the new tag that I want to enter. In the tutorial, when the presenter demonstrates this technique, a new blank line with the proper indent for a new tag is created between the opening and closing tags.
Is there any way I can change my settings to accomplish this?
Copy link to clipboard
Copied
You set up desired code formatting in your Preferences panel. Code Formatting > Tag Libraries. You'll need to do this for each tag. That said, I prefer to work with unindented code so mine is turned off.
Once completed, Apply Source Formatting.
I use the TAB key for Emmet shortcuts and to invoke Snippet triggers.
EMMET: Type this followed by TAB key.
div>(ul>li*3>{Lorem Ipsum})+p*4>lorem
Result:
<div>
<ul>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
</ul>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab deserunt numquam, iste pariatur laborum harum porro impedit itaque dignissimos minus facilis maxime dicta, consectetur, quia, voluptate praesentium odio. Pariatur, suscipit?</p>
<p>At quos tempore, placeat libero sint! Quod eius delectus voluptates ad, ratione suscipit eum totam placeat voluptatum, quam aperiam qui pariatur doloremque laudantium, adipisci at maxime sint eligendi quia ex.</p>
<p>Harum ab placeat, voluptates quae maxime reiciendis recusandae vero facere ipsa nobis optio quis quaerat nulla voluptatum tempore nesciunt quibusdam esse totam obcaecati id modi temporibus rerum error at. Quos!</p>
<p>Eum repellat dolorem ipsam facilis accusamus est incidunt atque tempore fuga accusantium delectus magni iusto consequuntur beatae distinctio, labore, autem commodi fugit maiores aspernatur minus officiis ratione eaque assumenda ad.</p>
</div>
Emmet & Snippets can save a lot tedious manual coding.
https://helpx.adobe.com/dreamweaver/using/writing-editing-code.html#emmet
Copy link to clipboard
Copied
Thanks Nancy, that got me part way to a solution. But when I select Tag Libraries and go to the tag I want to modify, I can't see how to make the changes I want. Can you explain those steps?
Thanks, Richard Murphy
Copy link to clipboard
Copied
Select TAG. Click on Line Breaks.
Select one:
That's the extent to which you can format automatic line breaks in code.
If you require more than that, you'll need to add line breaks manually in Code View by hitting the Enter key.
That said, Google recommends minifying code on the server to reduce space. If you do as Google recommends, your final code is condensed to a single line without any line breaks. Something to keep in mind.