diff --git a/UltiSnips/cpp.snippets b/UltiSnips/cpp.snippets index a49c433..ce79fd6 100644 --- a/UltiSnips/cpp.snippets +++ b/UltiSnips/cpp.snippets @@ -92,3 +92,15 @@ endsnippet snippet printf_sv "printf for std::string_view" printf("$1: %.*s\n", static_cast(${1:view}.size()), $1.data());$0 endsnippet + +snippet externc "extern C block" +#ifdef __cplusplus +extern "C" { +#endif + +$0 + +#ifdef __cplusplus +} +#endif +endsnippet