Question

Does Dreamweaver CS5 support auto-formatting feature similar to Visual Studio 2010 CTRL+K, CTRL+D?

Thanks!

Était-ce utile?

La solution

Yes it does. I don't think there is a keyboard shortcut for it, and I don't know how to make one if that is possible, but the auto-formatting is at Commands > Apply Source Formatting.

I hope that helps.

Autres conseils

Dreamweaver doesn't actually support auto code format where actually it needed. auto formatting works just on HTML, CSS... but not work for javascript, php etc.

Dreamweaver does support auto formatting. The commands menu offers a lot of features like spell check, recording, cleaning up html and, what we want, source formatting.

The only problem, is that by default Dreamweaver does not have a shortcut key for it. But this problem can be easily solved by defining a shortcut key of your choice.

Goto Edit > Keyboard Shortcuts

There are multiple sets of shortcut profiles, it is recommended to create one by duplicating one of the existing and naming it for future reference.

Once you do that, you can select Commands > Apply Source Formatting and assign a shortcut key to it.

A common issue is that most of the keys are already assigned to other options. I'm personally using Ctrl+Q as its not used by any other shortcut and is easier but you an chose any you like.

You can also define one for "Apply Source Formatting for Selection" which comes very handy.

Alternatively, you can also make keyboard shortcuts manually by editing the menus.xml

there is no shortcut but we can do a little workaround ALT+C than A

You can customize your own shortcut key for code formatting in Dreamweaver CS5. See 'Edit > Keyboard Shortcuts'; under the 'Commands' menu click 'Apply Source Formatting' and assign your custom keyboard shortcut. If the given shortcut is already assigned it will alert you.

Try this ALT+C+A . This worked for me in dreamviewer 6

ALT+C+A will work to apply Auto Format Source Code. It's not a defined shortcut. ALT+C for the commands menu and C for Apply Source Formatting.

Hope this will be helpful for you guys!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top