Move of Snippets into repository
This commit is contained in:
54
UltiSnips/lua.snippets
Normal file
54
UltiSnips/lua.snippets
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user