forked from dwiel/voicecode_community_packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython.coffee
More file actions
67 lines (63 loc) · 1.78 KB
/
Copy pathpython.coffee
File metadata and controls
67 lines (63 loc) · 1.78 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
enabled = false
if enabled
pack = Packages.register
name: "python"
description: "commands for writing python"
Settings.vocabulary =
vocabulary: [
'dict'
]
Settings.insert =
abbreviations:
'dictionary': 'dict'
pack.commands
enabled: true
,
"if name main":
spoken: "if name maine"
description: "if name main"
action: (input) ->
@string 'if __name__ == "__main__":'
@key 'enter'
"length of":
spoken: "length of"
description: "insert len()"
autoSpacing: 'always never'
action: (input) ->
@string 'len()'
@key 'left'
# "print":
# spoken: "print"
# description: "print command so that it isn't interpreted as prend"
# autoSpacing: 'normal normal'
# multiPhraseAutoSpacing: 'normal normal'
# action: (input) ->
# @string 'print'
'double-under':
spoken: 'double under'
grammarType: 'textCapture'
description: '__snake_text__'
tags: ['text', 'recommended']
spaceBefore: true
autoSpacing: (input) ->
if input then 'normal normal'
multiPhraseAutoSpacing: (input) ->
if input then 'normal normal'
action: (input) ->
if input
if input[0] == 'in' and input[1] == 'it'
input = ['init']
@string '__' + Transforms.snake(input) + '__'
'private-snake':
spoken: 'private snake'
grammarType: 'textCapture'
description: '_snake_text'
tags: ['text', 'recommended']
spaceBefore: true
autoSpacing: (input) ->
if input then 'normal normal'
multiPhraseAutoSpacing: (input) ->
if input then 'normal normal'
action: (input) ->
if input
@string '_ackages' + Transforms.snake(input)