Dreamweaver CS5 Auto-Format source code like in VS2010 CTRL+K, CTRL+D?

半世苍凉 提交于 2020-01-02 05:46:21

问题


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

Thanks!


回答1:


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.




回答2:


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.




回答3:


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




回答4:


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




回答5:


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.




回答6:


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




回答7:


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!



来源:https://stackoverflow.com/questions/3078082/dreamweaver-cs5-auto-format-source-code-like-in-vs2010-ctrlk-ctrld

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!