added a snippet, defined c, cpp folding functions