Highlighted

Indentation

Community Beginner ,
Aug 22, 2018

Copy link to clipboard

Copied

When I create a new document, the pre-filled codes are not indented accordingly. How can I indent them "quickly and easily" instead of tabbing at each line? Periodically, when I open someones' else code and I want to do the same to indent and find it daunting to do so due to the length of the codes. I know it will still work if the code is not indented but it does make a difference when reading it. Thank you for helping.

Dreamweaver 18:

Edit > Code > Apply Source Formatting

Dreamweaver CS6:

Commands > Apply Source Formatting

TOPICS
Learn Dreamweaver

Views

402

Likes

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

Indentation

Community Beginner ,
Aug 22, 2018

Copy link to clipboard

Copied

When I create a new document, the pre-filled codes are not indented accordingly. How can I indent them "quickly and easily" instead of tabbing at each line? Periodically, when I open someones' else code and I want to do the same to indent and find it daunting to do so due to the length of the codes. I know it will still work if the code is not indented but it does make a difference when reading it. Thank you for helping.

Dreamweaver 18:

Edit > Code > Apply Source Formatting

Dreamweaver CS6:

Commands > Apply Source Formatting

TOPICS
Learn Dreamweaver

Views

403

Likes

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
Aug 22, 2018 0
Mentor ,
Aug 22, 2018

Copy link to clipboard

Copied

Dreamweaver 18:

Edit > Code > Apply Source Formatting

Dreamweaver CS6:

Commands > Apply Source Formatting

Likes

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
Reply
Loading...
Aug 22, 2018 0
Community Beginner ,
Aug 22, 2018

Copy link to clipboard

Copied

This is what I am looking for (except that I was trying at Edit > Code > Indent Code)

By the way, when I apply source formatting and I get the following :

<html>

<head>

<title>Bootstrap Demo - 1</title>

<meta charset="UTF-8">

Why is <head>, <title> and <meta> not indented like this?

<html>

  <head>

    <title>Bootstrap Demo - 1</title>

    <meta charset="UTF-8">

Likes

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
Reply
Loading...
Aug 22, 2018 0
Mentor ,
Aug 22, 2018

Copy link to clipboard

Copied

jameshoty  wrote

Why is <head>, <title> and <meta> not indented like this?

<html>

  <head>

    <title>Bootstrap Demo - 1</title>

    <meta charset="UTF-8">

I've been coding pages for over 20 years and I have never indented tags outside the body. If you have a good reason for wanting to do it, you can probably edit your tag library... but logically, there is no usability benefit to it. I would leave the html and head tags alone.

The only thing I would seriously consider indenting... right off your page, actually... is Bootstrap

Likes

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
Reply
Loading...
Aug 22, 2018 2
Adobe Community Professional ,
Aug 23, 2018

Copy link to clipboard

Copied

The snide remarks about Bootstrap aside, I don't indent HTML code either.  Personally, I see no point in it.   I just wish Dreamwaver would respect non-indented HTML code in my PHP files  .   I have to save as HTML and then back to PHP to remove the indents.   Kind of a nuisance.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Aug 23, 2018 0
Community Beginner ,
Aug 26, 2018

Copy link to clipboard

Copied

I came from old school where indentation is like army-foot drill. It has to be tidy and neat. Most website I visit, their codes are indented. However, this is really personal preference but I strongly envisage one day I will be battling with this when I work with other developers who do not practise this. Perhaps this is the usual experience for someone like me that started 3 weeks into this field.

Likes

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
Reply
Loading...
Aug 26, 2018 1
Adobe Community Professional ,
Aug 27, 2018

Copy link to clipboard

Copied

I agree that DW needs to improve its code indentation a lot, starting by taking this setting out of preferences and taking it to the sites themselves, because not all production teams work with the same rules

Likes

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
Reply
Loading...
Aug 27, 2018 0
LEGEND ,
Aug 27, 2018

Copy link to clipboard

Copied

https://forums.adobe.com/people/Nancy+OShea  wrote

I don't indent HTML code either.  Personally, I see no point in it.   I just wish Dreamwaver would respect non-indented HTML code in my PHP files  .   I have to save as HTML and then back to PHP to remove the indents.   Kind of a nuisance.

I never indent any code either. I like it ALL flush left and I don't want any editor changing how I want to work either!

Likes

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
Reply
Loading...
Aug 27, 2018 0
Adobe Community Professional ,
Aug 27, 2018

Copy link to clipboard

Copied

if someone does not want indentation for code formatting (which is apparently the case of some of us around here), it is very easy to set the preferences parameters as such (indentation, space value, space type, etc. by resetting everything to none) and then apply code formatting....

the result will apply...in a perfect way and whatever the site is...

but for those of us who work with different teams and choose to indent their code, there is a big problem which is that on the one hand preferences are set at the global level and not at the level of each project (not all partners and teams have the same indentation rules and politics) and on the other hand parameters do not necessarily meet the needs when several languages are used within the same page, nor do they take into account all the languages offered by Dreamweaver.

so answer... it doesn't concern me, I don't use it, it doesn't fit my needs... is somewhere anti-constructive (this is neither an attack nor a provocation, to any one in particular ... it is just a remark)

Likes

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
Reply
Loading...
Aug 27, 2018 1
Adobe Community Professional ,
Aug 27, 2018

Copy link to clipboard

Copied

what is almost funny... if anyone connect to the prerelease forum (which is publicaly opened) he or she will constat, that a features request asking for such ameliorations on the code formating ... has been ... simply... closed by folks @adobe... funny isn't it ?

Adobe Prerelease

Likes

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
Reply
Loading...
Aug 27, 2018 0