| 📦 Turbo Go 3d7798b k33g 11h ago | 1 | # turbo-go snippets. |
| 2 | # |
| 3 | # Each [[snippet]] becomes one line of the Snippets menu. Snippets sharing a |
| 4 | # group appear together in a submenu of that name; one with no group goes into |
| 5 | # %s. A snippet is inserted at the cursor, and every line after the |
| 6 | # first is indented to match the line you inserted it on. |
| 7 | # |
| 8 | # languages restricts a snippet to files of those kinds, by the names the |
| 9 | # editor uses: go, toml, yaml, markdown, javascript, html, xml, dockerfile, |
| 10 | # bash. Leave it out and the snippet is offered everywhere. |
| 11 | # |
| 12 | # Your own snippets, shared across every project, go in: |
| 13 | # %s |
| 14 | |
| 15 | [[snippet]] |
| 16 | group = "Go" |
| 17 | name = "main" |
| 18 | languages = ["go"] |
| 19 | body = """package main |
| 20 | |
| 21 | import "fmt" |
| 22 | |
| 23 | func main() { |
| 24 | fmt.Println("hello world") |
| 25 | }""" |
| 26 | |
| 27 | [[snippet]] |
| 28 | group = "Go" |
| 29 | name = "switch" |
| 30 | languages = ["go"] |
| 31 | body = """ |
| 32 | i := 1 |
| 33 | |
| 34 | switch i { |
| 35 | case 1: |
| 36 | fmt.Println("one") |
| 37 | case 2: |
| 38 | fmt.Println("two") |
| 39 | case 3: |
| 40 | fmt.Println("three") |
| 41 | } |
| 42 | """ |
| 43 | |
| 44 | [[snippet]] |
| 45 | group = "General" |
| 46 | name = "Hello" |
| 47 | body = "Hello!!!" |
| 48 | |
| 49 | [[snippet]] |
| 50 | group = "Markdown" |
| 51 | name = "Image" |
| 52 | languages = ["markdown"] |
| 53 | body = "" |