Use snippet to generate text