-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippets.py
48 lines (46 loc) · 1.1 KB
/
snippets.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""custom completions, which are not autogenerated.
remember:
[
<trigger>: name\t<desc>: HISE
<content>: string $1 or ${<id>:<change>}
]
"""
from textwrap import dedent
sn_list = [
[
'parseInt\treturn int from string: HISE',
'parseInt(${1:var string})'
],
[
'callbacks mandatory\tmacro-snippet: HISE',
dedent('''\
function onNoteOn()
{
}
function onNoteOff()
{
}
function onController()
{
}
function onTimer()
{
}
function onControl(number, value)
{
}''')
],
[
'callback of control\tHISE',
dedent('''\
inline function on${1:name}Control(component, value)
{
${2://code}
};
Content.getComponent("${1:name}").setControlCallback(on${1:name}Control);''')
],
[
'include\t Include source file: HISE',
'include("${1:MyFile}.js");'
],
]