add multiple snippets; also trim trailing whitespace