Created
March 10, 2011 20:15
-
-
Save unixmonkey/864839 to your computer and use it in GitHub Desktop.
Cucumber Language definition file for TextMate; modified to work with Sublime Text 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>feature</string> | |
</array> | |
<key>firstLineMatch</key> | |
<string>기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd(.*)</string> | |
<key>foldingStartMarker</key> | |
<string>^\s*\b(예|시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|例子|例|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|サンプル|سيناريو مخطط|سيناريو|امثلة|الخلفية|תרחיש|תבנית תרחיש|רקע|דוגמאות|Тарих|Сценарій|Сценарији|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Примери|Пример|Приклади|Предыстория|Предистория|Позадина|Передумова|Основа|Мисоллар|Концепт|Контекст|Значения|Örnekler|Założenia|Wharrimean is|Voorbeelden|Variantai|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Tapaukset|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenarios|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenariji|Scenarijaus šablonas|Scenarijai|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Piemēri|Pavyzdžiai|Paraugs|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Juhtumid|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Exemplos|Exemples|Exemplele|Exempel|Examples|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esempi|Escenario|Escenari|Enghreifftiau|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Dis is what went down|Dasar|Contoh|Contexto|Contexte|Contesto|Condiţii|Conditii|Cobber|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Beispiele|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)</string> | |
<key>foldingStopMarker</key> | |
<string>^\s*$</string> | |
<key>keyEquivalent</key> | |
<string>^~C</string> | |
<key>name</key> | |
<string>Gherkin</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#feature_element_keyword</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#feature_keyword</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#step_keyword</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#strings_triple_quote</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#strings_single_quote</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#strings_double_quote</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#comments</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#tags</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#scenario_outline_variable</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#table</string> | |
</dict> | |
</array> | |
<key>repository</key> | |
<dict> | |
<key>comments</key> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>comment.line.number-sign</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>\s*(#.*)</string> | |
</dict> | |
<key>table</key> | |
<dict> | |
<key>begin</key> | |
<string>^\s*\|</string> | |
<key>end</key> | |
<string>\|\s*$</string> | |
<key>name</key> | |
<string>keyword.control.cucumber.table</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\w</string> | |
<key>name</key> | |
<string>source</string> | |
</dict> | |
</array> | |
</dict> | |
<key>feature_keyword</key> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.language.gherkin.feature</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>string.language.gherkin.feature.title</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>^\s*(기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd):(.*)\b</string> | |
</dict> | |
<key>step_keyword</key> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.language.gherkin.feature.step</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>^\s*(하지만|조건|먼저|만일|만약|단|그리고|그러면|那麼|那么|而且|當|当|前提|假設|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|و |متى |لكن |عندما |ثم |بفرض |اذاً |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Унда |То |Припустимо що |Припустимо |Онда |Но |Нехай |Лекин |Когато |Када |Кад |К тому же |И |Задато |Задати |Задате |Если |Допустим |Дадено |Ва |Бирок |Аммо |Али |Але |Агар |А |І |Și |És |anrhegedig a |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Youse know when youse got |Youse know like when |Yna |Ya know how |Ya gotta |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |Và |Ve |Und |Un |Thì |Then y'all |Then |Tapi |Tak |Tada |Tad |Så |Stel |Soit |Siis |Si |Quando |Quand |Quan |Pryd |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Når |När |Niin |Nhưng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu'|Kun |Kuid |Kui |Khi |Keď |Ketika |Když |Kai |Kada |Kad |Jeżeli |Ja |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |Eğer ki |Etant donné |Et |Então |Entonces |Entao |En |Eeldades |E |Duota |Dun |Donat |Donada |Diyelim ki |Dengan |Den youse gotta |De |Dato |Dar |Dann |Dan |Dado |Dacă |Daca |DEN |Când |Cuando |Cho |Cept |Cand |Cal |But y'all |But |Buh |Biết |Bet |BUT |Atès |Atunci |Atesa |Angenommen |And y'all |And |An |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A také |A |\* )</string> | |
</dict> | |
<key>feature_element_keyword</key> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.language.gherkin.feature.scenario</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>string.language.gherkin.scenario.title.title</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>^\s*(예|시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|例子|例|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|サンプル|سيناريو مخطط|سيناريو|امثلة|الخلفية|תרחיש|תבנית תרחיש|רקע|דוגמאות|Тарих|Сценарій|Сценарији|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Примери|Пример|Приклади|Предыстория|Предистория|Позадина|Передумова|Основа|Мисоллар|Концепт|Контекст|Значения|Örnekler|Założenia|Wharrimean is|Voorbeelden|Variantai|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Tapaukset|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenarios|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenariji|Scenarijaus šablonas|Scenarijai|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Piemēri|Pavyzdžiai|Paraugs|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Juhtumid|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Exemplos|Exemples|Exemplele|Exempel|Examples|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esempi|Escenario|Escenari|Enghreifftiau|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Dis is what went down|Dasar|Contoh|Contexto|Contexte|Contesto|Condiţii|Conditii|Cobber|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Beispiele|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y'all|Achtergrond|Abstrakt Scenario|Abstract Scenario):(.*)</string> | |
</dict> | |
<key>scenario_outline_variable</key> | |
<dict> | |
<key>begin</key> | |
<string><</string> | |
<key>end</key> | |
<string>></string> | |
<key>name</key> | |
<string>variable.other</string> | |
</dict> | |
<key>strings_double_quote</key> | |
<dict> | |
<key>begin</key> | |
<string>"</string> | |
<key>end</key> | |
<string>"</string> | |
<key>name</key> | |
<string>string.quoted.double</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\\.</string> | |
<key>name</key> | |
<string>constant.character.escape.untitled</string> | |
</dict> | |
</array> | |
</dict> | |
<key>strings_single_quote</key> | |
<dict> | |
<key>begin</key> | |
<string>(?<![a-zA-Z"])'</string> | |
<key>end</key> | |
<string>'(?![a-zA-Z])</string> | |
<key>name</key> | |
<string>string.quoted.single</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\\.</string> | |
<key>name</key> | |
<string>constant.character.escape</string> | |
</dict> | |
</array> | |
</dict> | |
<key>strings_triple_quote</key> | |
<dict> | |
<key>begin</key> | |
<string>"""</string> | |
<key>end</key> | |
<string>"""</string> | |
<key>name</key> | |
<string>string.quoted.single</string> | |
</dict> | |
<key>tags</key> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>storage.type.tag.cucumber</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>(@[^@\r\n\t ]+)</string> | |
</dict> | |
</dict> | |
<key>scopeName</key> | |
<string>text.gherkin.feature</string> | |
<key>uuid</key> | |
<string>85E2C52C-9B16-4A54-81E7-6D8D3ADAEFA8</string> | |
</dict> | |
</plist> |
This is beautiful. I did notice that it has the same issue that most apps have with color coding cucumber - the "([^"]*)" regex string always messes it up because of the middle quote. I've been solving it be doing a global replace to "(.+?)" when editing and reversing that when saving. Anybody seen an answer for that?
Is it possible to fix broken colors in cucumber steps files when using regular expressions ?
Thanks! This slotted beautifully into my Sublime Text 2 copy. I didn't even have to restart.
Can confirm that this works with Sublime 3 as well :-)
working great! thank you.
@bcantin's directions worked great on OS 10.10.2
@bcantin's directions worked great on OS 10.13.6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks a bunch