Skip to content

Instantly share code, notes, and snippets.

@elgalu
Created October 20, 2012 00:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elgalu/3921521 to your computer and use it in GitHub Desktop.
Save elgalu/3921521 to your computer and use it in GitHub Desktop.
Sublime Text - Adding ruby regular expression detection starting and ending with slashes
<!-- elgalu: Adding ruby regular expression detection starting and ending with slashes -->
<dict>
<key>begin</key>
<string>/</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>comment</key>
<string>regular expressions (literal)</string>
<key>end</key>
<string>/[eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.mod-r.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
</array>
</dict>
@fuksito
Copy link

fuksito commented Jan 8, 2013

Nice, helped me with broken syntax in cucumber page definitions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment