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
|
# turbo-go snippets.
#
# Each [[snippet]] becomes one line of the Snippets menu. Snippets sharing a
# group appear together in a submenu of that name; one with no group goes into
# %s. A snippet is inserted at the cursor, and every line after the
# first is indented to match the line you inserted it on.
#
# languages restricts a snippet to files of those kinds, by the names the
# editor uses: go, toml, yaml, markdown, javascript, html, xml, dockerfile,
# bash. Leave it out and the snippet is offered everywhere.
#
# Your own snippets, shared across every project, go in:
# %s
[[snippet]]
group = "Go"
name = "main"
languages = ["go"]
body = """package main
import "fmt"
func main() {
fmt.Println("hello world")
}"""
[[snippet]]
group = "Go"
name = "switch"
languages = ["go"]
body = """
i := 1
switch i {
case 1:
fmt.Println("one")
case 2:
fmt.Println("two")
case 3:
fmt.Println("three")
}
"""
[[snippet]]
group = "General"
name = "Hello"
body = "Hello!!!"
[[snippet]]
group = "Markdown"
name = "Image"
languages = ["markdown"]
body = ""
|