summaryrefslogtreecommitdiff
path: root/luasnip_snippets/vim.json
blob: 570bcb50943d4c649b46e3d89b21045674f09195 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "gvar": {
    "prefix": "gvar",
    "description": "Global / configuration variable",
    "body": [
      "if !exists(\"g:${1:MyUltraImportantVar}\")",
      "\tlet g:$1 = ${2:\"${3:<tab>}\"}",
      "endif"
    ],
    "luasnip": {
      "priority": -50
    }
  },
  "f": {
    "prefix": "f",
    "description": "function",
    "body": [
      "fun ${1:function_name}($2)",
      "\t${3:\" code}",
      "endf"
    ]
  }
}