From 83114d25a9039faffb7b668615b54d01a2dba480 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 15 Mar 2018 16:18:31 +0000 Subject: [PATCH] Add extern "C" block snippet --- UltiSnips/cpp.snippets | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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