1.1.0 • Published 5 years ago

textmate-bailout v1.1.0

Weekly downloads
204
License
ISC
Repository
github
Last release
5 years ago

What is this?

This is a very specific tool that is used when you have a TextMate grammar that wants to include/contain another Textmate grammar. For example a Markdown grammar wanting to include a C++ grammar.

How do I use it?

Here's an example of two differen LaTeX including an embedded C++ file:

let duplicateForEmbedding = require("textmate-bailout")

// 1.from a url (will download the source every time)
duplicateForEmbedding({ 
    url: 'https://raw.githubusercontent.com/jeff-hykin/cpp-textmate-grammar/master/syntaxes/cpp.tmLanguage.json', 
    appendScope: "latex",
    bailoutPattern: "\\\\end\\{minted\\}",
    newFileLocation: "cpp-latex.tmLanguage.json"
})
// 2.from a local file
duplicateForEmbedding({
    grammarFilePath: "./someGrammer.tmLanguage.json",
    appendScope: "latex",
    bailoutPattern: "\\\\end\\{minted\\}",
    newFileLocation: "cpp-latex.tmLanguage.json"
})