With this code I can quickly add and update (courtesy of Text::Reflow) flowerbox comments (for C or C++ or C#) from inside Vim. I've added set equalprg=perl\ d:\utils\equalsprg.pl to my .vimrc as a convenience. NB: code is rough, that's why it's a snippet :)

/*------------------------------- | Comments like this, similar to | | those found in crafty sources | -------------------------------*/
# Intended for use with VIM as the equalprg # Put the following line in your vimrc or <ftype>.vim # set equalprg=perl\ d:\utils\equalsprg.pl use strict; use warnings; use Text::Reflow qw/reflow_string/; my $text = join '',<>; exit unless $text; my $enteredvalue= join ' ', map { s/\s*\|\s*/ /g; # remove all pipe chars s/\/\*//g; # remove all block comment-st +art s/\*\///g; # remove all block comment-en +d s/^\s*\*//g; # remove all asterisks at sta +rt of line s/^\s*\/\///g; # remove all // at start of l +ine s/\-{5,}/ /g; # remove all strings of five +or more hyphens $_ } grep {!/^\//} grep {!/^\s*\-+\*\//} split /\n/,$text; exit unless ($enteredvalue); my $maxlen=0; my $result .= join "\n", map{"| " . substr($_ . ' 'x$maxlen, 0, $maxle +n) . " |" } map{ $maxlen = length($_) if (length > $maxle +n); $_ } # get the max line length split /\n/,reflow_string($enteredvalue); $result = '/*-'.'-'x$maxlen ."\n".$result. "\n" .' '.'-'x$maxlen ."-* +/\n"; # top and tail print $result;