Dreamweaver CS5 自动格式源代码就像 VS2010 中的 CTRL+K、CTRL+D 一样?
Dreamweaver CS5 是否支持类似于 Visual Studio 2010 CTRL+K、CTRL+D 的自动格式化功能?
谢谢!
Does Dreamweaver CS5 support auto-formatting feature similar to Visual Studio 2010 CTRL+K, CTRL+D?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
是的,确实如此。我不认为它有键盘快捷键,而且我不知道如何制作一个(如果可能的话),但自动格式化位于“命令”>“命令”中。应用源格式。
我希望这有帮助。
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.
Dreamweaver 实际上并不支持实际需要的自动代码格式。自动格式化仅适用于 HTML、CSS...但不适用于 javascript、php 等。
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 支持自动格式化。命令菜单提供了许多功能,例如拼写检查、记录、清理 html 以及我们想要的源格式。
唯一的问题是,默认情况下 Dreamweaver 没有快捷键。但是这个问题可以通过定义您选择的快捷键来轻松解决。
转到编辑>键盘快捷键
有多组快捷键配置文件,建议通过复制现有一组并命名来创建一组,以供将来参考。
完成此操作后,您可以选择“命令”>“应用源格式并为其分配快捷键。
一个常见的问题是大多数键已分配给其他选项。我个人使用 Ctrl+Q 因为它没有被任何其他快捷键使用,而且更容易,但你可以选择你喜欢的任何快捷键。
您还可以为“应用选择的源格式”定义一个,这非常方便。
或者,您也可以通过编辑 menus.xml 手动创建键盘快捷键
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
没有捷径,但我们可以做一些解决方法 ALT+C 而不是 A
there is no shortcut but we can do a little workaround ALT+C than A
您可以在 Dreamweaver CS5 中自定义代码格式化的快捷键。
请参阅“编辑”>键盘快捷键';在“命令”菜单下单击“应用源格式”并分配您的自定义键盘快捷键。如果给定的快捷方式已被分配,它会提醒您。
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.
试试这个 ALT+C+A 。这在 Dreamviewer 6 中对我有用
Try this ALT+C+A . This worked for me in dreamviewer 6
ALT+C+A 将适用于应用自动格式源代码。这不是一个定义的快捷方式。
ALT+C 用于命令菜单,C 用于应用源格式。
希望这对你们有帮助!
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!