X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=inline;f=.vim%2Fmysnippets%2Fcpp.snippets;fp=.vim%2Fmysnippets%2Fcpp.snippets;h=8d5468c94d75c4464a9dd293c5b44ac95697e362;hb=280abf6fd7d3541bf0bed20c9335f640087de257;hp=0000000000000000000000000000000000000000;hpb=77791e874daf9286ba53393970d1beec7df3dd5b;p=dotfiles.git diff --git a/.vim/mysnippets/cpp.snippets b/.vim/mysnippets/cpp.snippets new file mode 100644 index 0000000..8d5468c --- /dev/null +++ b/.vim/mysnippets/cpp.snippets @@ -0,0 +1,20 @@ +snippet guard "header guard" w +#ifndef $1 +#define $1 + +$0 + +#endif // $1 +endsnippet + +snippet cpp "cpp extern" w +#ifdef __cplusplus +extern "C" { +#endif + +$0 + +#ifdef __cplusplus +} +#endif +endsnippet