Move of Snippets into repository

This commit is contained in:
2023-07-31 17:42:59 +02:00
parent a7cf65baf4
commit a323c503b5
18 changed files with 2298 additions and 6 deletions

54
UltiSnips/lua.snippets Normal file
View File

@@ -0,0 +1,54 @@
snippet fun "New function"
function ${1:Name} ($2)
$3
end;
$0
endsnippet
snippet while "while-loop"
while (${1:true})
do
$1
end;
$0
endsnippet
snippet for "for loop"
for ${1:i = 0}, ${2:target}, ${3:1}
do
$4
end;
$0
endsnippet
snippet repeat "repeat until loop"
repeat
$2
until (${1:Condition});
$0
endsnippet
snippet ifthen "normal if clause"
if (${1:Condition})
then
$2
end;
$0
endsnippet
snippet ifelse "if and else clause"
if (${1:Condition})
then
$1
else
$2
end;
$0
endsnippet
snippet "= fun" "Assign a function" rA
= function(${1:Parameter})
$2
end;$0
endsnippet