• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

HTML Tag Autofill Spacing Error?

Community Beginner ,
Sep 28, 2022 Sep 28, 2022

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?

TOPICS
Code

Views

82

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2022 Sep 29, 2022

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.

image.png

Once completed, Apply Source Formatting.

Common ToolbarCommon Toolbar

 

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

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 06, 2022 Oct 06, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2022 Oct 06, 2022

Copy link to clipboard

Copied

LATEST

Select TAG.  Click on Line Breaks.

Select one: 

  • No line breaks.
  • Before and After Tag.
  • Before, Inside and After.
  • After Tag Only.

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.

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines