Highlight rspec in sublime text 2

The amount of DO END in my test files is getting confused.

Is there a way to highlight matching DO or END pairs in sublime text 2?

The Highlighter keychain does not have this feature (although the developer is studying it)

+7
source share
2 answers

I only needed to install the BracketHighlighter package (using the default repository in the Control Package) and restart Sublime (important!). AGS response is out of date.

+3
source

Edit

~/Library/Application Support/Sublime Text 2/Packages/BracketHighlighter/bh_core.sublime-settings

Add "RSpec" to the list of languages.

 // Ruby conditional statements { "name": "ruby", "open": "(^\\s*\\b(?:if|case|until|unless|while|begin|class|module|def\\b\\s*[a-zA-Z_\\d]+)|do)\\b", "close": "\\b(end)\\b", "style": "default", "scope_exclude": ["string", "comment"], "plugin_library": "bh_modules.rubykeywords", "language_filter": "whitelist", "language_list": ["RSpec", "Ruby", "Ruby on Rails", "HTML (Rails)"], "enabled": true }, 

Result

Result

EDIT

Installing the Highliter "BH2" branch using package management:

Open

~/Library/Application Support/Sublime Text 2/Packages/User/Package Control.sublime-settings

and add

 "repositories": [ "https://github.com/facelessuser/BracketHighlighter/tree/BH2" ] 

Then from the Packing Package Control: Upgrade Package Pack Package Control: Upgrade Package pop-up menu, and select "Knob Marker."

+6
source

All Articles