{ "name": "Vim Snippet", "scopeName": "source.vim-snippet", "patterns": [ { "include": "#main" } ], "repository": { "comment": { "name": "comment.line.number-sign.vim-snippet", "begin": "^#", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.number-sign.vim-snippet" } } }, "escape": { "name": "constant.character.escape.dollar-sign.vim-snippet", "match": "(\\\\).", "captures": { "1": { "name": "punctuation.definition.escape.vim-snippet" } } }, "expression": { "patterns": [ { "name": "string.interpolated.python-code.vim-snippet", "begin": "(`)(!p)", "end": "`", "patterns": [ { "name": "source.embedded.python", "match": "(?:[^\\\\`]|\\\\.)+", "captures": { "0": { "patterns": [ { "include": "source.python" } ] } } } ], "beginCaptures": { "1": { "name": "punctuation.section.begin.embedded.vim-snippet" }, "2": { "name": "keyword.operator.use-python.vim-snippet" } }, "endCaptures": { "0": { "name": "punctuation.section.end.embedded.vim-snippet" } } }, { "name": "string.interpolated.viml-code.vim-snippet", "begin": "(`)(!v)", "end": "`", "patterns": [ { "name": "source.embedded.viml", "match": "(?:[^\\\\`]|\\\\.)+", "captures": { "0": { "patterns": [ { "include": "source.viml" } ] } } } ], "beginCaptures": { "1": { "name": "punctuation.section.begin.embedded.vim-snippet" }, "2": { "name": "keyword.operator.use-viml.vim-snippet" } }, "endCaptures": { "0": { "name": "punctuation.section.end.embedded.vim-snippet" } } }, { "name": "string.interpolated.vim-snippet", "begin": "`", "end": "`", "patterns": [ { "name": "source.embedded.viml", "match": "(?:[^\\\\`]|\\\\.)+", "captures": { "0": { "patterns": [ { "include": "source.viml" } ] } } } ], "beginCaptures": { "0": { "name": "punctuation.section.begin.embedded.vim-snippet" } }, "endCaptures": { "0": { "name": "punctuation.section.end.embedded.vim-snippet" } } } ] }, "extends": { "name": "meta.$1.directive.vim-snippet", "begin": "^(extends|include|source)(?=\\s|$)", "end": "$", "patterns": [ { "name": "punctuation.separator.delimiter.comma.vim-snippet", "match": "," }, { "name": "entity.other.inherited-class.vim-snippet", "match": "[^,\\s]+" } ], "beginCaptures": { "1": { "name": "keyword.control.$1.directive.vim-snippet" } } }, "global": { "name": "meta.ultisnip.global.vim-snippet", "contentName": "source.embedded.python", "begin": "^(global)\\s+(!p)[ \\t]*$", "end": "^(endglobal)(?=\\s|$)", "patterns": [ { "include": "source.python" } ], "beginCaptures": { "1": { "name": "keyword.control.global.begin.vim-snippet" }, "2": { "name": "keyword.operator.use-python.vim-snippet" } }, "endCaptures": { "1": { "name": "keyword.control.global.end.vim-snippet" } } }, "main": { "patterns": [ { "include": "#snippet" }, { "include": "#comment" }, { "include": "#extends" }, { "include": "#global" }, { "include": "#priority" }, { "include": "#expression" }, { "include": "#version" }, { "include": "#ultisnips" }, { "include": "#neosnippet" } ] }, "neosnippet": { "patterns": [ { "name": "meta.neosnippet-field.vim-snippet", "match": "(?:\\G|^)(abbr|alias|delete|options)\\s+(\\S.*)", "captures": { "1": { "name": "keyword.operator.$1.vim-snippet" }, "2": { "name": "entity.other.neosnippet-keyword.vim-snippet" } } }, { "name": "meta.neosnippet-field.vim-snippet", "match": "(?x) (?:\\G|^)\n(regexp) \\s+\n( (')([^']*)(') # Single-quoted\n| (\")([^\"]*)(\") # Double-quoted\n| ([^'\"\\s]\\.) # Unquoted (?)\n)", "captures": { "1": { "name": "keyword.operator.regex.vim-snippet" }, "2": { "name": "string.regexp.quoted.single.vim-snippet" }, "3": { "name": "punctuation.definition.string.regexp.begin.vim-snippet" }, "4": { "patterns": [ { "include": "source.regexp" } ] }, "5": { "name": "punctuation.definition.string.regexp.end.vim-snippet" }, "6": { "name": "punctuation.definition.string.regexp.begin.vim-snippet" }, "7": { "patterns": [ { "include": "source.regexp" } ] }, "8": { "name": "punctuation.definition.string.regexp.end.vim-snippet" }, "9": { "patterns": [ { "include": "source.regexp" } ] } } } ] }, "priority": { "begin": "^priority(?=\\s|$)", "end": "$", "patterns": [ { "name": "constant.numeric.integer.int.vim-snippet", "match": "[-+]?[\\d.]+" } ], "beginCaptures": { "0": { "name": "keyword.control.version.directive.vim-snippet" } } }, "snippet": { "name": "meta.snippet.vim-snippet", "begin": "^(snippet)(!{0,2})(?=[ \\t]|$)", "end": "^(endsnippet)\\s*$|(?=^\\S)|(?\u003c=endsnippet)(?=\\s|$)", "patterns": [ { "include": "#snippetHead" }, { "include": "#snippetNeck" }, { "include": "#snippetBody" } ], "beginCaptures": { "1": { "name": "storage.type.class.vim-snippet" }, "2": { "name": "keyword.operator.scope.modifier.vim-snippet" } }, "endCaptures": { "1": { "name": "storage.type.class.end.vim-snippet" } } }, "snippetBody": { "patterns": [ { "include": "#escape" }, { "include": "#expression" }, { "include": "#tabStop" } ] }, "snippetHead": { "begin": "\\G", "end": "(?=^)|(?=\\s*$)", "patterns": [ { "begin": "\\G\\s*((\\S+))", "end": "(?=^|\\S)", "patterns": [ { "include": "#snippetNeck" } ], "beginCaptures": { "1": { "name": "entity.name.trigger.vim-snippet" }, "2": { "name": "markup.heading.vim-snippet" } } }, { "begin": "(?\u003c=\\s)(\")[^\"]*(\")", "end": "(?=^|\\S)", "patterns": [ { "include": "#snippetNeck" } ], "beginCaptures": { "0": { "name": "string.quoted.double.description.vim-snippet" }, "1": { "name": "punctuation.definition.string.begin.vim-snippet" }, "2": { "name": "punctuation.definition.string.end.vim-snippet" } } }, { "begin": "(?\u003c=\\s)[Abeimrstw]+(?=\\s*$)", "end": "(?=^|\\S)", "patterns": [ { "include": "#snippetNeck" } ], "beginCaptures": { "0": { "name": "constant.language.other.options.vim-snippet" } } }, { "begin": "(?\u003c=\\s)\\S+", "end": "(?=^|\\S)", "patterns": [ { "include": "#snippetNeck" } ], "beginCaptures": { "0": { "name": "entity.other.description.vim-snippet" } } }, { "include": "#snippetNeck" } ] }, "snippetNeck": { "contentName": "meta.snippet-body.vim-snippet", "begin": "\\G\\s*$\\s*", "end": "^(endsnippet)\\s*$|(?=^\\s)|(?\u003c=endsnippet)(?=\\s|$)", "patterns": [ { "begin": "(?\u003c=^)(?=\\S)(?!endsnippet|(?:abbr|alias|regexp|options)\\s+\\S)", "end": "^(endsnippet)(?=$|[ \\t])", "patterns": [ { "include": "#snippetBody" } ], "endCaptures": { "1": { "name": "storage.type.class.end.vim-snippet" } } }, { "begin": "(?\u003c=^)(?=(?:abbr|alias|regexp|options)\\s+\\S)", "end": "(?=^\\s)", "patterns": [ { "include": "#neosnippet" } ] } ], "endCaptures": { "1": { "name": "storage.type.class.end.vim-snippet" } } }, "tabStop": { "patterns": [ { "name": "variable.language.tab-stop.$2-nth.vim-snippet", "match": "(\\$)([0-9]+)", "captures": { "1": { "name": "punctuation.definition.variable.vim-snippet" } } }, { "name": "variable.language.tab-stop.$2-nth.vim-snippet", "match": "(\\${)([0-9]+)(})", "captures": { "1": { "name": "punctuation.definition.variable.begin.vim-snippet" }, "3": { "name": "punctuation.definition.variable.end.vim-snippet" } } }, { "name": "variable.language.tab-stop.$2-nth.placeholder.vim-snippet", "contentName": "markup.inserted.placeholder.vim-snippet", "begin": "(\\${)([0-9]+)(:)", "end": "}", "patterns": [ { "include": "#visual" }, { "include": "#escape" }, { "include": "#tabStop" } ], "beginCaptures": { "1": { "name": "punctuation.definition.variable.begin.vim-snippet" }, "3": { "name": "keyword.operator.assignment.key-value.vim-snippet" } }, "endCaptures": { "0": { "name": "punctuation.definition.variable.end.vim-snippet" } } }, { "name": "meta.transform.tab-stop.$2-nth.vim-snippet", "begin": "(\\${)([0-9]+)(?=/)", "end": "}", "patterns": [ { "name": "string.regexp.transform.vim-snippet", "contentName": "markup.deleted.transform.vim-snippet", "begin": "\\G/", "end": "/", "patterns": [ { "include": "source.regexp" } ], "beginCaptures": { "0": { "name": "keyword.control.transform.begin.vim-snippet" } }, "endCaptures": { "0": { "name": "keyword.control.transform.middle.vim-snippet" } } }, { "contentName": "markup.inserted.transform.vim-snippet", "begin": "(?\u003c=/)", "end": "(/)([gima]*)", "patterns": [ { "include": "source.regexp" } ], "endCaptures": { "1": { "name": "keyword.control.transform.end.vim-snippet" }, "2": { "name": "storage.modifier.transform.option.vim-snippet" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.variable.begin.vim-snippet" }, "2": { "name": "variable.language.tab-stop.vim-snippet" } }, "endCaptures": { "0": { "name": "punctuation.definition.variable.end.vim-snippet" } } } ] }, "ultisnips": { "patterns": [ { "name": "meta.clear.directive.vim-snippet", "begin": "^(clearsnippets)(?=\\s|$)", "end": "$", "patterns": [ { "name": "variable.parameter.function.vim-snippet", "match": "[^\\s]+" } ], "beginCaptures": { "1": { "name": "keyword.control.clearsnippets.directive.vim-snippet" } } }, { "name": "meta.$1.directive.vim-snippet", "begin": "^(context|pre_expand|post_expand|post_jump)(?=[ \\t]|$)", "end": "$", "patterns": [ { "name": "string.quoted.double.python-code.vim-snippet", "match": "(\")([^\"]*)(\")", "captures": { "1": { "name": "punctuation.definition.string.begin.vim-snippet" }, "2": { "patterns": [ { "include": "source.python" } ] }, "3": { "name": "punctuation.definition.string.end.vim-snippet" } } } ], "beginCaptures": { "1": { "name": "keyword.control.$1.directive.vim-snippet" } } } ] }, "version": { "match": "^(version)\\s+(\\d)", "captures": { "1": { "name": "keyword.control.version.directive.vim-snippet" }, "2": { "name": "constant.numeric.integer.int.vim-snippet" } } }, "visual": { "patterns": [ { "name": "constant.language.visual-content.unbraced.vim-snippet", "match": "(\\$)VISUAL", "captures": { "1": { "name": "punctuation.definition.vim-snippet" } } }, { "name": "constant.language.visual-content.braced.vim-snippet", "match": "(\\${)VISUAL(})", "captures": { "1": { "name": "punctuation.definition.begin.vim-snippet" }, "2": { "name": "punctuation.definition.end.vim-snippet" } } }, { "name": "constant.language.visual-content.v0-syntax.vim-snippet", "match": "({)VISUAL(})", "captures": { "1": { "name": "punctuation.definition.begin.vim-snippet" }, "2": { "name": "punctuation.definition.end.vim-snippet" } } } ] } } }