snippets: new if generate snippet and a small white space fix