[TxMt] Re: Using „First Line Match” in grammars
Allan Odgaard
mailinglist at textmate.org
Wed Oct 29 19:56:48 UTC 2014
On 29 Oct 2014, at 17:03, Stefan Daschek wrote:
>> Can we identify Rails projects (for the project scope)?
>
> Maybe by checking if there's a toplevel `Gemfile` with a line matching
> `gem\s+'rails'`?
>
> Most newer Rails projects use binstubs, so checking for the existence
> of `bin/rails` would also be possible. (But there are still many Rails
> projects without binstubs.)
The current system (to identify projects) looks for a file (glob) in a
file’s current or ancestor directory. It can’t check the content of
other files or similar.
> Is it possible to specify the project scope in a (local)
> .tm_properties file?
Yes, that is done simply by using scopeAttributes — but if you have a
local .tm_properties you might as well just set the .rb → Rails
directly in there.
More information about the textmate
mailing list