Had the need to do this, saving the snippet here.
Found a nice post on this kind of stuff here. I haven't implemented all of it by any means, but the omnifunc code completion and snippetsEmu are quite nice. Also did my own hacky perversion of the :make command.
It is not necessary to log in to comment, but if you wish to, you may do so here.