On 25 Oct 2014, at 0:04, Stefan Daschek wrote:
Makes sense! So the precendence is like this?
- Use explicit binding from Global.tmProperties.
- If none found, use first line match.
- If none found, use file types (extension).
Yes.
If more than one bundle claims a file type by extension, is it “longest match wins“? (The RSpec bundle uses `_spec.rb` which seems to take precedence over Ruby's `rb` even for empty files.)
Yes, longest wins.
And what happens if two bundles claim the exact same extension? (Both Ruby and Rails claim `rb`, and apparently the Ruby bundle “wins”.)
This is undefined.
[ *.rb~*_spec.rb ] fileType = source.ruby.rails
Cool – didn't know that it's possible to combine wildcards like this!
This is also useful when doing folder searches, and one can add multiple exclusions.