MTCodeBeautifier for ColdFusion

When putting together the blog and choosing which plugins to install–Chafic and I have very different views, I want everything since they’re nice to have, and Chafic wants to keep it down since it’s his server–I really longed for color coding ColdFusion code. This entry on Mike’s blog first introduced me to MTCodeBeautifier, from Sean Voisen. The resulting ActionScript looked great and my ColdFusion posts were boring by comparison.

After reviewing the plugin I decided to jump in and create a ColdFusion syntax file. While the syntax file is technically a Perl module, the format was easy to follow. I used Excel to convert my EditPlus syntax files, which I originally compiled from Dreamweaver MX configuration files, into Perl code. Made a few very simple additions to the plugin, and instant Rainbow Fusion.

teacher=CreateObject("component","teacher");
teacher.firstName="Sally";
teacher.lastName="Mae";
teacher.salary="19872";

students=ArrayNew(1);
students[1]=CreateObject("component","student");
students[1].firstName="Sam";
students[1].lastName="Neff";
students[1].gpa=2.8;

students[2]=CreateObject("component","student");
students[2].firstName="Nicole";
students[2].lastName="Smith";
students[2].gpa=4.0;

displayPerson(teacher);
for (i=1; i lte ArrayLen(students); i=i+1) {
displayPerson(students[i]);
}

Name XML
#Arguments.person.firstName#
#Arguments.person.lastName# #XmlFormat(Arguments.person.serializeXml())#

Anyone using MovableType for a ColdFusion blog is welcome to download the modified Plugin. I’ll also send the changes to Sean and maybe he’ll incorporate it into the next version he releases.

5 thoughts on “MTCodeBeautifier for ColdFusion

  1. Pingback: Voisen.org

  2. GilI apologize for the late reopsnse. If you have not found the answer to your question, I would be glad to help you. First off, what type of dynamic data are you referring to? I can put together a quick tutorial which can show you how to add dynamic data from say a form or from an array if that is what you are talking about.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>