The amount of DO END in my test files are getting confusing.
Is there a way to highlight the matching pairs of a DO or END in sublime text 2?
Bracket Highlighter doesn't have this functionality (although the developer is looking into it)
Edit
~/Library/Application Support/Sublime Text 2/Packages/BracketHighlighter/bh_core.sublime-settings
Add "RSpec" to the language list.
// 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
},
The result
EDIT
Installing the Bracket Highliter "BH2" branch via package control:
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 package control drop down menu: Package Control: Upgrade Package
and select Bracket Highlighter.
I needed only to install the BracketHighlighter package (using the default repository in Package Control) and restart Sublime (important!). The answer by AGS is out of date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With