Reputation: 45941
Sublime Text 2 does not highlight require_relative
, but does highlight require
.
How to add require_relative
to the list of words for syntax highlighting for Ruby?
Upvotes: 2
Views: 859
Reputation: 11904
In Ruby.tmLanguage, Change this line:
<string>\b(require|gem)\b</string>
to
<string>\b(require|gem|require_relative)\b</string>
The Ruby.tmLanguage file can be found from within Sublime Text 2 with Sublime Text > Preferences > Browse Packages
.
Upvotes: 4
Reputation: 717
You will need to edit the Ruby tmLanguage file. This should be located in your "sublime install directory"/Data/Packages/Ruby. The format maybe a little strange but sublime text docs gives you instructions on how to edit the tmLanguages files here http://docs.sublimetext.info/en/latest/reference/syntaxdefs.html
Upvotes: 1