forked from Lissy93/espanso-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coding.yml
62 lines (51 loc) · 1.5 KB
/
coding.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
58
59
60
61
62
name: coding
package_author: Alicia Sykes <https://aliciasykes.com>
parent: default
matches:
# JavaScript & Web Development
# Adds a multi-line comment, with cursor in the middle
- trigger: ":??"
replace: "/* $|$ */"
# Inserts a HTML block comment
- trigger: ":=="
replace: "<!-- $|$ -->"
# Inserts console.log statement
- trigger: ":con"
replace: "console.log($|$);"
# JS console.log, will print variable name and value of a variable in your clipboard
- trigger: ":print"
replace: "console.info({ {{clipboard}} });"
vars: [{ name: "clipboard", type: "clipboard"}]
# Inserts i18n block, with the key using the contents of clipboard
- trigger: ":trans"
replace: "$t('{{clipboard}}')"
vars: [{ name: "clipboard", type: "clipboard"}]
# Inserts CSS variable
- trigger: ":var"
replace: "var(--$|$)"
# Inserts common HTML elements
- trigger: :hr
replace: '<hr />'
- trigger: :br
replace: '<br />'
- trigger: :div
replace: '<div>$|$</div>'
- trigger: :span
replace: '<span>$|$</span>'
- trigger: :h1
replace: '<h1>$|$</h1>'
- trigger: :h2
replace: '<h2>$|$</h2>'
- trigger: :h3
replace: '<h3>$|$</h3>'
- trigger: :para
replace: '<p>$|$</p>'
# Inserts any custom HTML, XML or web component tag
- trigger: ":tag"
replace: "<{{html.element}}>$|$</{{html.element}}>"
vars:
- name: "html"
type: form
params:
layout: "XML / HTML Element Inserter\nTag Name: {{element}}"
fields: { element: { type: text }}