-
Notifications
You must be signed in to change notification settings - Fork 22
/
md-formatting.yml
57 lines (50 loc) · 1.51 KB
/
md-formatting.yml
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
# Shortcuts for formatting text posts in markdown, bbcode, and HTML
# For use with Espanso, the open source cross-platform text expander
# Licensed under MIT X11, © Alicia Sykes 2022: https://aliciasykes.com
name: text-formatting
package_author: Alicia Sykes <[email protected]>
parent: default
matches:
# Inserts a markdown code block
- trigger: :md-code
replace: "```\n$|$\n```"
# Inserts markdown collapsable section
- trigger: :md-collapse
replace: "\n<details>\n\t<summary>$|$</summary>\n\t<p></p>\n</details>"
# Outputs markdown link, with clipboard contents as the URL
- trigger: ":md-link"
replace: "[$|$]({{clipboard}})"
vars:
- name: "clipboard"
type: "clipboard"
# Creates a HTML anchor element, with clipboard contents as href
- trigger: ":html-link"
replace: "<a href=\"{{clipboard}}\" />$|$</a>"
vars:
- name: "clipboard"
type: "clipboard"
# Outputs BB Code link, with clipboard contents as the URL
- trigger: ":bb-link"
replace: "[url={{clipboard}}]$|$[/url]"
vars:
- name: "clipboard"
type: "clipboard"
# Auto close brackets, quotes and formatting modifiers, and put cursor in center
- trigger: ':(('
replace: '($|$)'
- trigger: ':[['
replace: '[$|$]'
- trigger: ':{{'
replace: '{$|$}'
- trigger: ':<<'
replace: '<$|$>'
- trigger: ':``'
replace: '`$|$`'
- trigger: ":\''"
replace: "\'$|$\'"
- trigger: ':""'
replace: '"$|$"'
- trigger: ':__'
replace: '_$|$_'
- trigger: ':**'
replace: '*$|$*'