My Compromise On ColdFusion Code Snippet Color Coding
Posted October 5, 2006 at 4:53 PM by Ben Nadel
That title is a mouth-full!
I have been battling with color-coding my ColdFusion blog entry code snippets. In my blog, all of my code is organized in unordered lists with a div wrapper. I love using lists for code layout because it give me greater control over the layout, the inline "framing" for scroll bars, and the way the code lines wrap. I have seen PRE tag usage all over the place and the code always looks junky to me. It wraps, the tabbing is poop, and the readability is non-existent for anything long.
Now, my DIV / UL combo makes color coding very hard. I have tried to go down that route and it is just a headache. BUT, color coding does add a ton of readability to the code. I have come up with a compromise: inline, I will continue to use the DIV / UL solution. However, at the beginning of every code snippet I am adding a link (at run time) that will allow you to pop the code snippet up into a new window. The code in this new window will use the PRE method with proper color coding.
I would love some feedback on how this solutions works for people. I think it leaves the main blog much more readable but gives the option to make a view of the code much more readable.
What Other People Are Searching For
[ local search ]
color coding coldfusion code snippets
- Wanted: Full-Time ColdFusion Developer at Intoria Internet Architects
- Cold Fusion Senior Developer at Edge Information Management
- Back-End Web Developer-Information Technologist at Michigan State University
- ColdFusion Developer at Nonfat Media
- Mid-to-Senior Level Web Application Developer at SiteVision, Inc.
Sounds like a good idea - how about an example?
Check it out: http://bennadel.com/index.cfm?dax=blog:320.view