Have you tried using the snippeting built into ES?