Win7下替换Dreamweaver的配色方案:
%appdata%\Adobe\Dreamweaver CS6\zh_CN\Configuration\CodeColoring\Colors.XML
自己定义编辑,或者找个现成的替换:
重启Dreamweaver,编辑-首选参数-代码颜色,默认背景可以选择:#4D4D4D、#002B2B、#373737、#25221C
将Smarty的TPL文件加入到php的颜色方案中:
第一步:
修改%appdata%\Adobe\Dreamweaver CS6\zh_CN\Configuration\Extensions.txt,确认含有tpl(如果已经有了可以无视):
第二步:
修改两个文件
%appdata%\Adobe\Dreamweaver CS6\zh_CN\Configuration\DocumentTypes\MMDocumentTypes.XML,
..\Program Files\Adobe\Adobe Dreamweaver CS6\configuration\DocumentTypes\MMDocumentTypes.XML
将TPL从”id=”HTML””组移动到”id=”PHP_MySQL””组中:
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html"> //去掉tpl: <documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,lasso,xhtml" macfileextension="html,htm,shtml,shtm,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">
<documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3,php4,php5,phtml" macfileextension="php,php3,php4,php5,phtml" file="Default.php" writebyteordermark="false" mimetype="text/html"> <documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic" winfileextension="php,php3,php4,php5,tpl,phtml" macfileextension="php,php3,php4,php5,tpl,phtml" file="Default.php" writebyteordermark="false" mimetype="text/html">
重新打开个*.tpl文件看看,是不是跟打开php一样的配色方案了。
参考:
http://www.piaoyun.org/Adobe-Dreamweaver-CS6-Notepad-code-color-20120831.html
http://fronterahouse.com/blog/news/color-code-tpl-or-inc-files-as-php-with-dreamweaver/(English)
http://dvlancer.com/11-dreamweaver-open-tpl-files-with-php-code-coloring.html(English)
http://blog.css-js.com/dev-tools/%E8%AE%A9dreamweaver-tpl-do-color.html