dreamweaver_根据您的需求自定义Dreamweaver

dreamweaver

Cartoonists pick and choose their pens. Contractors select their wood. Teachers decorate their classrooms. Why can’t developers customize their editors? Wait a minute… they can!

漫画家们挑选他们的笔。 承包商选择他们的木材。 老师装饰教室。 开发人员为什么不能自定义他们的编辑器? 等一下...他们可以!

This article explains a few of the most useful customization tricks which can be achieved by you, the Macromedia Dreamweaver user.

本文介绍了Macromedia Dreamweaver用户可以实现的一些最有用的自定义技巧。

Important Notes

重要笔记

This tutorial is written for Macromedia Dreamweaver MX, the latest version as of December 2002. Many of the examples provided, however, can be achieved in earlier versions (especially v4, a nearly identical Dreamweaver product).

本教程是针对Macromedia Dreamweaver MX(截至2002年12月的最新版本)编写的。但是,提供的许多示例都可以在较早的版本中实现(尤其是v4,这是几乎相同的Dreamweaver产品)。

Dreamweaver tweaks may include modifications of the /Configuration/ directory. The files in this folder are essential to the software’s stability. Therefore, a backup is suggested.

Dreamweaver的调整可能包括/ Configuration /目录的修改。 此文件夹中的文件对于软件的稳定性至关重要。 因此,建议备份。

When editing a Dreamweaver config file, do not open the document in Dreamweaver. This may compromise stability. Other choices may include Microsoft Notepad or Macromedia HomeSite. I’ll assume you have a basic knowledge of this product and its capabilities.

编辑Dreamweaver配置文件时,请勿在Dreamweaver中打开文档。 这可能会损害稳定性。 其他选择可能包括Microsoft记事本或Macromedia HomeSite。 我假设您具有该产品及其功能的基本知识。

控制文件扩展名 (Controlling Your Document Extensions)

One of the very first things I noticed after purchasing Macromedia’s Dreamweaver MX was the default naming of HTML files as .htm documents. Though this is just as acceptable as the traditional .html extension, the transition from my own standards, quite frankly, bugged me. To manage your document extensions, let’s pull up DW’s extension config file at:

购买Macromedia的Dreamweaver MX之后,我注意到的第一件事就是将HTML文件默认命名为.htm文档。 尽管这和传统的.html扩展名一样可以接受,但是坦率地说,从我自己的标准过渡到我时还是很烦。 要管理您的文档扩展名,请在以下位置拉出DW的扩展名配置文件:

../Macromedia/Dreamweaver MX/Configuration/DocumentTypes/MMDocumentTypes.xml

../Macromedia/Dreamweaver MX / Configuration / DocumentTypes / MMDocumentTypes.xml

Here you’ll find the document extension settings for our program. To change the default HTML extension, locate line 3 and change the following code from:

在这里,您将找到我们程序的文档扩展名设置。 要更改默认HTML扩展名,请找到第3行,并将以下代码更改为:

winfileextension="htm,html,shtml,shtm,stm,lasso,xhtml,inc"

winfileextension =“ htm,html,shtml,shtm,stm,套索,xhtml,inc”

to:

至:

winfileextension="html,htm,shtml,shtm,stm,lasso,xhtml,inc"

winfileextension =“ html,htm,shtml,shtm,stm,套索,xhtml,inc”

In addition, Mac users may make the same alteration to the macfileextension attribute. All we’ve really done here is change the priority of the HyperText Markup Language’s extension. It’s quite simple, really. And by editing things such as this in the file, we can generate entirely new actions for Dreamweaver.

另外,Mac用户可以对macfileextension属性进行相同的更改。 我们在此所做的全部工作就是更改超文本标记语言扩展名的优先级。 确实很简单。 通过编辑文件中的类似内容,我们可以为Dreamweaver生成全新的动作。

Here’s another that I edited. I found that the browser-readable PHP document type PHPS lacks color coding, so I decided to add this extension to PHP’s extension library. How? On line 67, I changed the winfileextension and macfileextension attributes to include the .phps filetype. They originally read:

这是我编辑的另一个。 我发现浏览器可读PHP文档类型PHPS缺少颜色编码,因此我决定将此扩展添加到PHP的扩展库中。 怎么样? 在第67行,我将winfileextension和macfileextension属性更改为包括.phps文件类型。 他们最初读:

winfileextension="php,php3"

winfileextension =“ php,php3”

So I changed them to:

所以我将它们更改为:

winfileextension="php,php3,phps"

winfileextension =“ php,php3,phps”

And, of course, the same changes can be made for macfileextension. With this information you should be able to control your Dreamweaver extension actions effortlessly.

而且,当然,可以对macfileextension进行相同的更改。 有了这些信息,您应该能够轻松控制Dreamweaver扩展操作。

更改默认文档模板 (Alter Default Document Templates)

Standards change, personal preferences vary, and sometimes we just get plain lazy. Luckily, those kind Macromedia developers have left us a few handy options. Let’s pull up our new document directory at:

标准在变化,个人喜好在变化,有时我们只是变得懒惰。 幸运的是,那些善良的Macromedia开发人员为我们提供了一些方便的选择。 让我们在以下位置打开新的文档目录:

../Macromedia/Dreamweaver MX/Configuration/DocumentTypes/NewDocuments/

../Macromedia/Dreamweaver MX / Configuration / DocumentTypes / NewDocuments /

Here you’ll find all the basic document templates for Dreamweaver-initiated files. All you’ll have to do is open the appropriate filetype document and edit the template to suit your needs. For this example, let’s pretend we want to use the same external cascading stylesheet location for every HTML document we make for the foreseeable future. To make this a part of Dreamweaver’s natural code, we’ll edit the contents of the HTML template, Default.html. It looks like this:

在这里,您将找到Dreamweaver启动的文件的所有基本文档模板。 您所要做的就是打开适当的文件类型文档并编辑模板以适合您的需求。 对于此示例,假设我们希望在可预见的将来为每个HTML文档使用相同的外部级联样式表位置。 为了使它成为Dreamweaver自然代码的一部分,我们将编辑HTML模板Default.html的内容。 看起来像这样:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
</head>
<body>
</body>
< /html>

Simply edit your code as shown below, and save.

只需如下所示编辑代码,然后保存。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
<link href="/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
< /html>

It’s as simple as that!

就这么简单!

编辑标签库 (Edit the Tag Library)

The Dreamweaver tag library is the source for all of your tag settings, including line breaks, contents, and capitalization. This is primarily used to optimize code for filesize and browser compatibility, as things such as white space tend to cause problems. But you might also wish to change a few other options for the sake of convenience. To open the tag library editor, go to:

Dreamweaver标记库是所有标记设置(包括换行符,内容和大写字母)的来源。 这主要用于优化代码以实现文件大小和浏览器兼容性,因为诸如空格之类的东西容易引起问题。 但是,为了方便起见,您可能还希望更改其他一些选项。 要打开标签库编辑器,请转到:

Edit > Tag Libraries…

编辑>标记库…

A master list of Dreamweaver-written tags and attributes provides concise insight as to what the software is able to produce. New additions will extend both the code-view dropdown menus, and Dreamweaver’s ability to comprehend your documents. Tag formatting should also be taken advantage of. Though Macromedia has created the most respected Internet development software, the default settings are less than stellar.

Dreamweaver编写的标签和属性的主列表提供了有关软件能够产生什么的简明见解。 新增功能将扩展代码视图下拉菜单和Dreamweaver理解文档的能力。 标签格式也应加以利用。 尽管Macromedia已创建了最受人尊敬的Internet开发软件,但默认设置却不算是一流的。

Dreamweaver的关键首选项 (Key Dreamweaver Preferences)

For the typical Dreamweaver novice, the large list of software tweaks can be quite daunting. Most can be completely ignored, however, as only a select few impact your work environment. I’ll highlight the major preferences you should customize. First, let’s get into the preference panel by selecting:

对于典型的Dreamweaver新手来说,大量的软件调整可能令人生畏。 但是,大多数都可以完全忽略,因为只有少数几个会影响您的工作环境。 我将重点介绍您应该自定义的主要偏好。 首先,让我们进入“偏好设置”面板,方法是:

Edit > Preferences…

编辑>首选项...

Category Important Tweaks

类别重要调整

Here’s a list of the most essential changes you should approve.

这是您应批准的最重要更改的列表。

  • General – Document Options: Open Files in New Window; Editing Options: Use <strong> and <em> in place of <b> and <i>

    常规–文档选项:在新窗口中打开文件; 编辑选项:使用<strong>和<em>代替<b>和<i>

  • Accessibility – None

    辅助功能–

  • Code Coloring – None

    代码着色–

  • Code Format – Indent; Tab Size; Automatic Wrapping; Default Tag Case; Default Attribute Case; Override Case Of; Centering

    代码格式–缩进; 标签大小; 自动包装; 默认标签大小写; 默认属性大小写; 优先案件; 定心

  • Code Hints – Delay

    代码提示–延迟

  • Code Rewriting – Rewrite Code: Rename Form Items When Pasting

    代码重写–重写代码:粘贴时重命名表单项

  • CSS Styles – None

    CSS样式-

  • File Types/Editors – None

    文件类型/编辑器-

  • Fonts – Code View

    字体–代码视图

  • Highlighting – None

    突出显示-

  • Invisible Elements – Show; Server-Side Includes

    隐形元素–显示; 服务器端包含

  • Layers – Netscape 4 Compatibility

    图层– Netscape 4兼容性

  • Layout View – None

    布局视图–

  • New Document – Default Document Type; Make Document XHTML Compliant

    新文档–默认文档类型; 使文档符合XHTML

  • Panels – None

    面板–

  • Preview in Browser – Browsers

    在浏览器中预览–浏览器

  • Quick Tag Editor – Options

    快速标签编辑器-选项

  • Site – All

    网站–全部

  • Status Bar – Connection Speed (56k preferably)

    状态栏–连接速度(最好为56k)

  • Validator – All

    验证器–全部

编辑键盘快捷键 (Edit Keyboard Shortcuts)

Keyboard shortcuts are a developer’s best friend. Once you get used to them, work becomes a whole lot easier. However, what if you switched to Dreamweaver from a program that used different shortcuts? Or if you just really hate the ones Macromedia has provided? Not to worry!

键盘快捷键是开发人员最好的朋友。 一旦适应了它们,工作就会变得非常容易。 但是,如果从使用不同快捷方式的程序切换到Dreamweaver怎么办? 还是真的讨厌Macromedia提供的内容? 不要担心!

Edit > Keyboard Shortcuts…

编辑>键盘快捷键…

This is the master control panel for your Dreamweaver keyboard shortcuts. A ‘set’ is simply a database of shortcuts that can be activated or deactivated.

这是Dreamweaver键盘快捷键的主控制面板。 “集合”只是可以激活或停用的快捷方式数据库。

For example, let’s pretend we’re pulling a practical joke on our friend Joe. Our buddy always uses the Ctrl+N and Ctrl+O shortcuts to create and open documents. Yes, we’re evil. Let’s switch them.

例如,让我们假装对我们的朋友乔开个恶作剧。 我们的好友始终使用Ctrl + N和Ctrl + O快捷键来创建和打开文档。 是的,我们是邪恶的。 让我们切换它们。

Make sure Macromedia Standard is selected as the active set, and click on the first icon to duplicate the database. Rename the set to ‘Our Evil Scheme’. Under the Menu Commands section, maximize the File category and find ‘New…’. Delete the old shortcut by highlighting it and hitting the minus action. Place your pointer in the text field and press Ctrl+O on your keyboard (don’t type it literally — carry out the action). Then select Change.

确保选择Macromedia Standard作为活动集,然后单击第一个图标以复制数据库。 将场景重命名为“我们的邪恶计划”。 在“菜单命令”部分下,最大化“文件”类别并找到“新建...”。 通过突出显示旧的快捷方式并单击减号操作来删除它。 将指针放在文本字段中,然后在键盘上按Ctrl + O(不要按字面意思输入-请执行操作)。 然后选择更改。

Now we have a duplicate Ctrl+O entry, but Dreamweaver will only use the first entry that occurs in the database. So go back and replace the ‘Open…’ action with Ctrl+N as we did before. Hit OK.

现在,我们有一个重复的Ctrl + O条目,但是Dreamweaver将仅使用数据库中出现的第一个条目。 因此,请像以前一样用Ctrl + N替换“ Open…”操作。 点击确定。

Well, our prank was a success… sort of. Joe has until tomorrow to fix the software or he will be fired by his boss! Open the Keyboard Shortcut editor. Select Macromedia Standard as your set and hit OK. Open it back up and hit the trash can. Confirm the deletion of Our Evil Scheme so there’s no evidence. Hit OK and exit. That’s it!

好吧,我们的恶作剧是成功的……。 乔直到明天都必须修复该软件,否则他将被老板解雇! 打开键盘快捷方式编辑器。 选择Macromedia Standard作为您的设置,然后单击OK。 将其打开,然后打垃圾桶。 确认删除我们的邪恶计划,所以没有证据。 点击确定并退出。 而已!

Let’s not abuse this feature, eh?

让我们不要滥用此功能,是吗?

利用Macromedia扩展 (Utilizing Macromedia Extensions)

If you don’t already have the Extension software installed, you can download it here.

如果尚未安装扩展软件,则可以在此处下载。

The Extension Manager is Macromedia’s most useful tool for customizing the way Dreamweaver reads, writes, and expedites. Widespread popularity and the product’s targeted audience have produced an exceptional database of add-on modules that work with this software.

扩展管理器是Macromedia用于定制Dreamweaver读取,写入和加速方式的最有用的工具。 广泛的普及度和产品的目标受众已经产生了与该软件一起使用的附加模块异常数据库。

To locate a plugin that’s suitable for you, visit http://www.macromedia.com/exchange/. Here you’ll find the list of extendable Macromedia products, as well as the link for the Exchange Manager. Point your browser to the Dreamweaver (MX) section, and get a Macromedia ID. Once you’ve signed up, you’ll have access to a myriad of downloads.

要找到适合您的插件,请访问http://www.macromedia.com/exchange/ 。 在这里,您将找到可扩展的Macromedia产品列表以及Exchange Manager的链接。 将您的浏览器指向Dreamweaver(MX)部分,并获取Macromedia ID。 注册后,您将可以访问大量的下载内容。

Log in, and use the ‘browse extensions…’ dropdown to locate an appropriate plugin and platform. Save the desired file into:

登录并使用“浏览扩展…”下拉菜单找到合适的插件和平台。 将所需文件保存到:

../Macromedia/Extension Manager/Downloads/

../Macromedia/扩展管理器/下载/

Once the transfer is complete, open Macromedia Extension Manager.

传输完成后,打开Macromedia Extension Manager。

Select:

选择:

File > Install Extension…

文件>安装扩展名...

Then simply follow the on-screen directions, and finally restart Dreamweaver. Instructions concerning the module’s use and location are available in the manager’s extension list.

然后,只需按照屏幕上的说明进行操作,最后重新启动Dreamweaver。 管理员的扩展名列表中提供了有关模块使用和位置的说明。

重要参考 (Important References)

The following is a list of official Macromedia Dreamweaver MX documents and references that will aid the customization process. Some of these files have been used in the creation of this tutorial and may be further utilized to enhance your Dreamweaver experience.

以下是Macromedia Dreamweaver MX官方文档和参考的列表,这些文档将有助于自定义过程。 其中一些文件已用于创建本教程,并且可能会进一步用于增强Dreamweaver体验。

Don’t forget to back up important files!

不要忘记备份重要文件!

MM DW Exchange Databased Downloads – Help > Dreamweaver Exchange http://dynamic.macromedia.com/bin/MM/exchange/main.jsp?product=dreamweaver

MM DW Exchange数据库下载–帮助> Dreamweaver Exchange http://dynamic.macromedia.com/bin/MM/exchange/main.jsp?product=dreamweaver

MM DW Support Center Information Database Help > Dreamweaver Support Center http://www.macromedia.com/support/dreamweaver/

MM DW支持中心信息数据库帮助> Dreamweaver支持中心http://www.macromedia.com/support/dreamweaver/

Extending DW MX Local Information Database Help > Extending Dreamweaver

扩展DW MX本地信息数据库帮助>扩展Dreamweaver

MM Support: Online Forums Online Message Boards Help > Macromedia Online Forums http://www.macromedia.com/support/forums

MM支持:在线论坛在线留言板帮助> Macromedia在线论坛 http://www.macromedia.com/support/forums

Customizing MM DW MX Compressed Adobe PDF File http://www.macromedia.com/support/dreamweaver/custom/customizing_dwmx/

自定义MM DW MX压缩的Adobe PDF文件 http://www.macromedia.com/support/dreamweaver/custom/customizing_dwmx/

MM DW MX Shortcut Matrix Compressed Adobe PDF File http://www.macromedia.com/support/dreamweaver/documentation/dwmx_shortcuts/

MM DW MX快捷方式矩阵压缩的Adobe PDF文件http://www.macromedia.com/support/dreamweaver/documentation/dwmx_shortcuts/

MM DW Updates File Downloads http://www.macromedia.com/support/dreamweaver/downloads_updaters.html

MM DW更新文件下载http://www.macromedia.com/support/dreamweaver/downloads_updaters.html

缩略图生成器和优化器 (Thumbnail Generator and Optimizer)

The thumbnail generator/optimizer is a little-known capability of the software. Though it’s not hidden in any way, I know barely a single person who’s taken advantage of this convenient tool. Go to:

缩略图生成器/优化器是该软件鲜为人知的功能。 尽管它没有以任何方式隐藏,但我几乎不认识一个人利用了此便捷工具。 去:

Commands > Create Web Photo Album…

命令>创建网络相册…

Here you’ll find a quick, easy, and painless way to process images on the go. Select a source and destination folder, tweak the other optional settings, and let Dreamweaver do the rest. I usually throw out the automatically generated HTML page, though you may find it useful.

在这里,您将找到一种快速,简便且轻松的方式来处理图像。 选择一个源文件夹和目标文件夹,调整其他可选设置,然后让Dreamweaver进行其余操作。 我通常会抛出自动生成HTML页面,尽管您会发现它很有用。

With these tips you should have success in changing the way your Dreamweaver software assists you in your Web development. Good luck!

通过这些技巧,您应该成功地改变Dreamweaver软件协助您进行Web开发的方式。 祝好运!

翻译自: https://www.sitepoint.com/customize-dreamweaver-needs/

dreamweaver

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值