Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tomav committed Nov 1, 2012
0 parents commit c696a78
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Behat-Comments.JSON-tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Behat Features Comments",
"comment": "SublimeText2 Comments Syntax for Behat",
"scope": "source.feature",
"fileTypes": ["feature"],
"settings": {
"shellVariables": [
{
"name": "TM_COMMENT_START",
"value": "# "
}
]
},
"uuid": "a2cd264a-4c2f-427e-84eb-0344e93b1340"
}
30 changes: 30 additions & 0 deletions Behat-Comments.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>SublimeText2 Comments Syntax for Behat</string>
<key>fileTypes</key>
<array>
<string>feature</string>
</array>
<key>name</key>
<string>Behat Features Comments</string>
<key>scope</key>
<string>source.feature</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string># </string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>a2cd264a-4c2f-427e-84eb-0344e93b1340</string>
</dict>
</plist>
Binary file added Behat-Comments.tmPreferences.cache
Binary file not shown.
63 changes: 63 additions & 0 deletions Behat-Features.JSON-tmLanguage
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "Behat Features",
"comment": "SublimeText2 Syntax Definition for Behat",
"scopeName": "source.feature",
"fileTypes": ["feature"],
"patterns": [

{
"comment": "Behat definitions",
"name": "keyword.control.source.behat",
"match": "(Feature:|Examples:|Scenario:|Scenario Outline:|Background:)"
},


{
"comment": "Behat step keyword",
"name": "keyword.operator.step.behat",
"match": "(Given|When|And|But|Then)"
},


{
"comment": "Behat scenario tags",
"name": "storage.type.class.behat",
"match": "(@[A-Za-z0-9]+)"
},


{
"comment": "Behat comment",
"name": "comment.line.number-sign.behat",
"begin": "#",
"end": "\\n"
},


{
"comment": "Behat strings",
"name": "string.quoted.double.behat",
"begin": "\"",
"end": "\""
},


{
"comment": "Behat placeholders",
"name": "string.interpolated.behat",
"begin": "<",
"end": ">"
},


{
"comment": "Behat outline examples",
"name": "string.quoted.other.examples.behat",
"begin": "\\| ",
"end": " \\|\\n"
}


],
"uuid": "45340a49-8e17-474d-9ab0-0c17e6ca5be0"
}
85 changes: 85 additions & 0 deletions Behat-Features.tmLanguage
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>SublimeText2 Syntax Definition for Behat</string>
<key>fileTypes</key>
<array>
<string>feature</string>
</array>
<key>name</key>
<string>Behat Features</string>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>Behat definitions</string>
<key>match</key>
<string>(Feature:|Examples:|Scenario:|Scenario Outline:|Background:)</string>
<key>name</key>
<string>keyword.control.source.behat</string>
</dict>
<dict>
<key>comment</key>
<string>Behat step keyword</string>
<key>match</key>
<string>(Given|When|And|But|Then)</string>
<key>name</key>
<string>keyword.operator.step.behat</string>
</dict>
<dict>
<key>comment</key>
<string>Behat scenario tags</string>
<key>match</key>
<string>(@[A-Za-z0-9]+)</string>
<key>name</key>
<string>storage.type.class.behat</string>
</dict>
<dict>
<key>begin</key>
<string>#</string>
<key>comment</key>
<string>Behat comment</string>
<key>end</key>
<string>\n</string>
<key>name</key>
<string>comment.line.number-sign.behat</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>comment</key>
<string>Behat strings</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.quoted.double.behat</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>comment</key>
<string>Behat placeholders</string>
<key>end</key>
<string>&gt;</string>
<key>name</key>
<string>string.interpolated.behat</string>
</dict>
<dict>
<key>begin</key>
<string>\| </string>
<key>comment</key>
<string>Behat outline examples</string>
<key>end</key>
<string> \|\n</string>
<key>name</key>
<string>string.quoted.other.examples.behat</string>
</dict>
</array>
<key>scopeName</key>
<string>source.feature</string>
<key>uuid</key>
<string>45340a49-8e17-474d-9ab0-0c17e6ca5be0</string>
</dict>
</plist>
Binary file added Behat-Features.tmLanguage.cache
Binary file not shown.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SublimeText2 Behat Features Syntax Highlight

## Installation

Clone the repo in your personal SublimeText2/Packages folder.

## Basic usage

The syntax highlighting will be automatically applied to .feature files.

The Behat Features syntax highlight can be found in the menu under View > Syntax > Behat Features.

## Currently supporting :
* Feature
* Scenario, Scenario Outline, Background
* Given, Then, When, And, But
* | multi | columns | data | sets |
* Comments
* Tags
* Placeholders

0 comments on commit c696a78

Please sign in to comment.