MrDanA
MrDanA

Reputation: 11647

Setting Syntax Highlight for Specific Folder (not Extension)

I know that in Sublime Text 3 I can use the bottom right drop-up menu to temporarily change a file's syntax highlighting; and I know that I can, from this same menu, change the syntax highlighting for all files with the same extension.

However, I want to do this for just a specific folder. Is there any way to do that?

The case is that I am working on a Ruby on Rails project. Most files with extension .rb I want to open as Ruby, fine. But files under features/step_definitions, which have the .rb extension, I want to open using the Cucumber Steps syntax highlight (so just that one folder).

Upvotes: 1

Views: 332

Answers (1)

leesei
leesei

Reputation: 6070

Try the ApplySyntax package.
See the "RSpec/RSpec" example in settings.
You can also add a comment on the first line to specify the Cucumber Steps syntax, see "XML/XML" example in settings for "first_line" option usage.

Upvotes: 3

Related Questions