forked from dwiel/talon_community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
c.py
30 lines (26 loc) · 915 Bytes
/
c.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
from talon.voice import Context, Key
from ..utils import is_filetype
FILETYPES = (".c",)
ctx = Context("c", func=is_filetype(FILETYPES))
ctx.keymap(
{
"tip pent 64": "int64_t ",
"tip you went 64": "uint64_t ",
"tip pent 32": "int32_t ",
"tip you went 32": "uint32_t ",
"tip pent 16": "int16_t ",
"tip you went 16": "uint16_t ",
"tip pent 8": "int8_t ",
"tip you went 8": "uint8_t ",
"tip size": "size_t",
"state include": "#include ",
"state include system": ["#include <>", Key("left")],
"state include local": ['#include ""', Key("left")],
"state type deaf": "typedef ",
"state type deaf struct": ["typedef struct {\n\n};", Key("up"), "\t"],
"indirect": "&",
"dereference": "*",
# Other commands for convenience
"word streak": ["streq()", Key("left")],
}
)