From 97ec814ca2b4c90ebdee24a91ba91688fff0c7b6 Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Wed, 11 Dec 2024 00:20:13 +0800 Subject: [PATCH] Support cmake filetype --- snippets/cmake.snippets | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/snippets/cmake.snippets b/snippets/cmake.snippets index 54b956629..0029f1c68 100644 --- a/snippets/cmake.snippets +++ b/snippets/cmake.snippets @@ -1,3 +1,44 @@ +snippet if "if" + if($1) + $2 + endif() + +snippet ife "if / else" + if($1) + $2 + else() + $3 + endif() + +snippet ifee "if / elseif / else" + if($1) + $2 + elseif($3) + $4 + else() + $5 + endif() + +snippet for "foreach" + foreach($1 ${$2}) + $3 + endforeach() + +snippet while "while" + while($1) + $2 + endwhile() + +snippet macro "macro" + macro($1) + $2 + endmacro() + +snippet function "function" + function($1) + $2 + endfunction() + snippet init cmake_minimum_required(VERSION ${1:2.8.2}) project(${2:ProjectName})