Reputation: 5545
As part of a Rails project, I'd like to create some custom settings (specifically indentation!) for "HTML (Rails)" (aka .html.erb) files and Ruby on Rails files (.rb files).
I know how to create and edit a Preferences.sublime-settings file - AND a Ruby.sublime-settings file - but I have one question remaining for each file type:
(1) For .html.erb files, what [language] do I use when creating the [language].sublime-settings file? Is there a big list somewhere of all the languages possible to use in this case and others?
(2) After I've created these custom settings (as I have for Ruby.sublime-settings already, customizing my tabs to 2 spaces), I would like to globally apply these new settings to all Ruby riles.
(Bonus) My .rb files within my Rails project seem to load the "Ruby on Rails" syntax instead of just the "Ruby" syntax (shown in the bottom-right of Sublime Text). If Ruby.sublime-settings will not affect .rb "Ruby on Rails" files (this seems to be the case for me..), I would love an answer for #1 for both .html.erb AND .rb files that are created as part of a Rails project.
I've found much info on SO related to this question, but the two questions above remain unanswered for me after ~1 hour of Googling and creeping the Sublime Text docs.
Thanks!
Upvotes: 3
Views: 2366
Reputation: 5545
OOOOhhhhh, I figured this one out on my own.
Sublime can generate custom settings-sublime files for each file type via its UI - this doesn't have to be created via command line or Terminal, etc.
Here's how it's done:
This opens a sublime-settings file with the proper syntax/type/name. Enter your settings here, then save the file. :)
DONE!
Upvotes: 9