Skip to content

Commit

Permalink
Support cmake filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 10, 2024
1 parent f0a3184 commit 97ec814
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions snippets/cmake.snippets
Original file line number Diff line number Diff line change
@@ -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})
Expand Down

0 comments on commit 97ec814

Please sign in to comment.