Date Tags software

Sometimes normal leading comments just aren't enough, instead a visual method of grouping blocks of code together is needed. The following pattern seems to work very well:

<comment-symbol>{-- <group-text> --
<code-here>
<comment-symbol>----}

Here is an example in C:

/*{-- Some grouped variables. --*/
/* Maintains foo-y stuff. */
int foo = 1;
/* Maintains bar-y stuff. */
int bar = 2;
/*----}*/

Here is an example in Python:

#{-- Some cool code here. --
foo = 1
bar = 2
#----}

Multi-line example in JavaScript:

//{-- Big long explanation of a
// really cool thing this next
// block of code will do. --
var foo = 1;
var bar = 2;
//----}

A nice feature this format provides is that matching bracket jumping will work. Therefore if your editor supports jumping, you can quickly move between the start and end of the code block. For example, in Vim use % while in normal mode, in SublimeText use CTRL-M.

Hi, I am Jeff Rimko!
A computer engineer and software developer in the greater Pittsburgh, Pennsylvania area.