Almost all modern software packages have the ability to be extended using plugins – Coda, which is my favorite coding editor, is one such program. One of the rules I try to stick to when writing code is to always document it, adding comments inside the code so that whoever come behind me will know what is going on, and that I myself will be able to figure out my own coding later! It’s hard to remember what you were trying to accomplish on a project when you come back to it later, especially if you have worked on several big projects in between.
One of the plugins I came across was a comment banner creator. Here is the deal, inside of Coda, write the text for your comment banner and then hit the keyboard shortcut (control-shift-B) and it turns it into a comment banner. The problem that I found with the plugin is that it could not handle multiple lines. For example, the following sample three lines:
BEGIN CREDIT CARD PROCESSING
sample test line number 2 with
more info here on the third line
Would become a comment like this:
//=======================================
// BEGIN CREDIT CARD PROCESSING
sample test line number 2 with
more info here on the third line
//=======================================
You see my concern – the second and third comment lines were not comment at all and would actually throw an error. Not a big deal I know, but wasted time in having to go back and add the slashes in the front of it.
Issue number two with the plugin is the length of the lines it created around the comment (the equal signs). The original plugin would sometimes extend that line much farther than the comments themselves. A small comment may turn out ok, add a few more words to the line and suddenly the equal signs balloon out half way across the page. I will say that I think this has been fixed in the second release of the plugin.
Here is what I have done to improve on the plugin:
- Can now handle multiple lines
- "Prettier" comment border lines
An example:
// ===========================================
// ! Start page header processing and sub- !
// ! title displaying !
// ===========================================
Notice that the box totally encloses the comment now. Also, there is a uniformness to the size of the box…
You can of course check out the original Coda Comment Banner plugin right here!
You can download my version by clicking here!









Hey there everyone i was just introduceing myself here im a first time visitor who hopes to become a daily reader!