0 Replies Latest reply on Aug 29, 2007 2:32 PM by gogogadgetearl

    Auto-Indent, Auto-Close Tags/Braces

    gogogadgetearl
      Is there any way to get Dreamweaver to auto-indent/auto-close in a different way? I would love to be able to type the opening tag of an XHTML element, and as soon as I start a new line after that opening tag, Dreamweaver auto-indents the insertion point 1 tab/space further than the opening tag, drops the closing tag to the next line, and lines the closing tag up with the opening tag.

      There is similar functionality already available when you edit JavaScript files in Dreamweaver. To see for yourself, open a new JavaScript file, define a new function, type the opening brace, and start a new line - the insertion point is auto-indented 1 tab/space further than the parent function. And when you type the closing brace, it auto-outdents it to match the indentation of the function.

      Quizzically, the same functionality is *not* available in CSS files, even though the format is nearly the same as JavaScript (with regard to braces).

      While I'm asking, is there any way to get Dreamweaver to auto-close braces in JavaScript and CSS files?

      I've scoured Google for an answer and I've looked for possible extensions, but to no avail. I'd even be willing to write an extension - I researched it, but I couldn't find any documentation showing how to manipulate code files in real-time.

      Can anybody tell me how to accomplish this (through options, existing extensions, or even by showing me the proper API for manipulating code files in real-time)?