Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Introduction

TextMate is a general purpose GUI text editor for MacOS released by MacroMates.
It is also a language grammar specification that is mainly used for syntax highlighting.
Supported by VSCode, Github, Sublime, Atom and of course TextMate.

TextMate has a lot of incomplete and fragmented documentation.
Hopefully this can be a comprehensive guide for VSCode's JSON TextMate.

Supported formats:

TextMate is a top down line based lexer. This was done for performance reasons.
Meaning you can't match past/over new lines \n.

Package.json

VSCode's TextMate grammar files use the file extension .tmLanguage.json & .tmLanguage and are located in ./extensions/publisher.extension_name.version/syntaxes/*.
TODO: Explain basics of the Package.json in relation to TextMate syntaxes.

Regex

List of TextMate engines and their Regex engines:

regex.tmLanguage.json.
\\K Keep effectively moves the start position of the captured text.
\\G MatchAnchor matches against the end of a begin rule.
Capture groups inside a positive-lookaround can be targeted by capture.
Capture groups inside a negative-lookaround will cause an error. Use non-capture group (?:...) instead.

Embedded Languages

embedded-languages
Todo:

More Links