init commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
ctx.matches = r"""
|
||||
code.language: markdown
|
||||
"""
|
||||
|
||||
mod.list("markdown_code_block_language", desc="Languages for code blocks")
|
||||
ctx.lists["user.markdown_code_block_language"] = {
|
||||
"typescript": "typescript",
|
||||
"python": "python",
|
||||
"code": "",
|
||||
"ruby": "ruby",
|
||||
"shell": "shell",
|
||||
"bash": "bash",
|
||||
"json": "json",
|
||||
"are": "r",
|
||||
"markdown": "markdown",
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
code.language: markdown
|
||||
-
|
||||
(level | heading | header) one:
|
||||
edit.line_start()
|
||||
"# "
|
||||
(level | heading | header) two:
|
||||
edit.line_start()
|
||||
"## "
|
||||
(level | heading | header) three:
|
||||
edit.line_start()
|
||||
"### "
|
||||
(level | heading | header) four:
|
||||
edit.line_start()
|
||||
"#### "
|
||||
(level | heading | header) five:
|
||||
edit.line_start()
|
||||
"##### "
|
||||
(level | heading | header) six:
|
||||
edit.line_start()
|
||||
"###### "
|
||||
|
||||
list [one]:
|
||||
edit.line_start()
|
||||
"- "
|
||||
list two:
|
||||
edit.line_start()
|
||||
" - "
|
||||
list three:
|
||||
edit.line_start()
|
||||
" - "
|
||||
list four:
|
||||
edit.line_start()
|
||||
" - "
|
||||
list five:
|
||||
edit.line_start()
|
||||
" - "
|
||||
list six:
|
||||
edit.line_start()
|
||||
" - "
|
||||
|
||||
{user.markdown_code_block_language} block:
|
||||
user.insert_snippet("```{markdown_code_block_language}\n$0\n```")
|
||||
|
||||
link: user.insert_snippet_by_name("link")
|
||||
Reference in New Issue
Block a user