ColdFusion Builder - HTML Colorization

Author: sandeepp  |  Category: ColdFusion Builder, Colorization  |  Comments (3)  |  Add Comment

In ColdFusion Builder HTML colors can be customized through Preferences->HTML-Editors->HTML->Colors preference page.

HTML colorization affects all HTML tags in a generic way and to set color for individual tags (like Table or Form tags) is not possible.

Here is colorization file to change HTML colors similar to that of Dreamweaver. Since all Dreamweaver colorization option are not exactly mapped to HTML colorization, it tries to match Dreamweaver html colorization as much as possible.

To use this navigate to HTML color preferences and click import button. Point ColdFusion Builder to this .col file and hit apply. That’s it!!

Understanding Default colorization for HTML Tags:

By default angular Braces for HTML tags are colorized differently than tag name. Apart from these most options are straight forward, and should be easy to change through HTML Color Preferences.

Here is how you customize colorization for angular braces around html tags.

1) Select HTML->Editors->HTML->Colors in preferences
2) Expand “Punctuator” node, Select Start Tag.
3) With Start Tag entry selected expand region colorization section below.
4) Change two entries “Tag_part” and “Name_part” to color of your choice.
5) Click apply to notice changes in any currently open file with html code.

Follow similar steps for “Punctuator” End tag entry to colorize html end tag.

Understanding  region colorization:

Regions are used to further break down any known token into number of parts. For eg.  for start tag (”<table>”) you can define 3 different regions as “<” , “table” “>” and colorize them differently.
Any tag with defined region for them have a small bar in front of their entry in token section.
Attached is screen shot which shows start tag with region colorization defined for it.
Also notice small bar in front of start tag to indicate the same.

ColdFusion Builder Comment Colorization

Author: sandeepp  |  Category: ColdFusion Builder, General  |  Comments (2)  |  Add Comment

Default colorization for ColdFusion Builder beta does not have background color set for comments. I guess lots of Dreamweaver users are used to having comment background colorized. Here’s a quick solution for that.

1) Open Editor Color Preferences(Window->Preferences->ColdFusion->Editor Profiles->Editor->Colors)

2) Click import and point to this colorization file

3) Click Apply. That’s it!!!…you are done.

Now, if you are wondering what this colorization file is, and are interested to know about it  then keep reading.

Colorization file is an xml file, which tells ColdFusion Builder how to colorize CFML. This can be created by exporting your current colorization settings.

Once you open this file you will see styles assigned for different CFML tokens.

For eg. <style foreground=”rgb(0,0,192)” id=”KEYWORD”/> meaning create style with id KEYWORD with assigned RGB colors.

Now this style can be applied to any category or token as below

<category name=”KEYWORD” style=”KEYWORD”/>

this means all keywords are styled with style identified with id “KEYWORD”.

So you can have your own custom style created and assigned to available token or categories.

Note:In preference UI only style options available are to change foreground colors and text style as(Bold/Italic/Underlined).

To change background color, as in case of comments, this has to be put in colorization file and imported back to apply.

Here’s how you assign background color for comments

create style for both background and foreground color

<style background=”rgb(255,255,153)” foreground=”rgb(0,0,0)” id=”WHITESPACE_COMMENT”/>
assign it to comment token as

<category name=”WHITESPACE” style=”WHITESPACE”>
<token style=”WHITESPACE_COMMENT” type=”COMMENT”/>
</category>

So if you need to change comment background color, just assign corresponding RGB value to the color you want to set in comment style and import your colorization file again.