Code indentation in Dreamweaver

    Date: 03/02/07 (Web Development)    Keywords: php, html

    I saw some folks complaining in a previous post about code indentation in Dreamweaver. On top of that, I know there's an ongoing war between Tabs and Spaces when it codes to indenting code.

    If you use Dreamweaver, indentation is really a non-issue. Even the Tab contingency and the Space contingency can get along.

    First go to Edit--Preferences--Code Format and select your favorite indent. (Personally, I use 1 tab and set the tab size to 3.) You can set other options for code formatting here as well.

    Next—with an HTML/CFM/PHP/whatever file open—go to Commands--Apply Source Formatting. Dreamweaver will automatically indent your code, making it consistent with your preferences.

    The keyboard shortcut for that is Alt-c-a, so whenever I open a file with inconsistent indentation, or that uses spaces when I prefer tabs, I just hit Alt-c-a, and suddenly the world on my screen is a more beautiful place.

    Source: http://community.livejournal.com/webdev/390025.html

« Searching Wikipedia... || AJAX ajax AJAX »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home