Skip to content

Commit 97ec814

Browse files
committed
Support cmake filetype
1 parent f0a3184 commit 97ec814

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

snippets/cmake.snippets

+41
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
snippet if "if"
2+
if($1)
3+
$2
4+
endif()
5+
6+
snippet ife "if / else"
7+
if($1)
8+
$2
9+
else()
10+
$3
11+
endif()
12+
13+
snippet ifee "if / elseif / else"
14+
if($1)
15+
$2
16+
elseif($3)
17+
$4
18+
else()
19+
$5
20+
endif()
21+
22+
snippet for "foreach"
23+
foreach($1 ${$2})
24+
$3
25+
endforeach()
26+
27+
snippet while "while"
28+
while($1)
29+
$2
30+
endwhile()
31+
32+
snippet macro "macro"
33+
macro($1)
34+
$2
35+
endmacro()
36+
37+
snippet function "function"
38+
function($1)
39+
$2
40+
endfunction()
41+
142
snippet init
243
cmake_minimum_required(VERSION ${1:2.8.2})
344
project(${2:ProjectName})

0 commit comments

Comments
 (0)