and Sublime text

Get rid of those pesky tags for some smooth script

Posted by Mark Drew on code on September 13, 2017

Tagged under

I am not sure how many people know about this but one of the things that come up in the issue tracker for the most awesome CFML package for Sublime Text was the ability to convert tag based CFML documents to script automagically!

The site, developed by Peter Freitag is called (the title gave it away didn’t it?) and it’s pretty awesome!

Now the site is great, but there is also a Commandbox (which is awesome by the way ) command over on Forgebox! This means you can automatically convert a file by simply doing:

box cfscriptme Application.cfc

And your ugly tag based Application.cfc will look like a scripted beauty in a few seconds!

Now this is all fine, you can even do folders and what not, but how about doing this right in your editor? If you are using Sublime Text you can go to Tools > Build System > New Build System ... and you can then create a new file as follows:

	"shell_cmd": "box cfscriptme sourcePath=\"$file_name\" force=true",
	"selector": "embedding.cfml"

Now all you have to do is click cmd + b and after a few seconds… magic! Why not give it a try?

comments powered by Disqus