From: Christoph Egger Date: Fri, 20 Feb 2015 17:02:03 +0000 (+0100) Subject: Add include guard X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;ds=inline;p=snippets.git Add include guard --- 289a5868628343921d45ad6218eef8d2bb622047 diff --git a/c++-mode/include-guard.yasnippet b/c++-mode/include-guard.yasnippet new file mode 100644 index 0000000..6dfb304 --- /dev/null +++ b/c++-mode/include-guard.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: include-guard +# key: iguard +# -- +#ifndef ${1:INCLUDE__`(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))`_hxx_} +#define $1 + +$0 + +#endif /* $1 */ \ No newline at end of file