I did a quick search of the interwebs for this, but came up blank. I was wondering, before I go off and do it myself, if anyone has already made or heard of a script to fill out C case statements for you.
The number of times that I write something like this in a day is ridiculous: switch (some_variable) { case _some_root_wibble: case _some_root_wobble: case _some_root_jelly: case _some_root_on_a_stick: } Typically I will write the first case line and then copy it X times, and do a "cw" on the tail of the enum value followed by ^N and then a selection from the resultant menu. What I would really like is to just do the ^N on the initial "_some_root", see that the popup menu shows the correct four values, and press some key combo to insert them all on consecutive lines like above. I'm not even fussy if it inserts the "case" and the ":", I can very easily do them myself with a couple of key presses. Has anyone seen something to do this before, or does anyone have any ideas about how to implement this? Cheers! Max