On 23 Apr 2019, at 10:13, Dr Eberhard W Lisse wrote:
[…] so
mate -t source.r -
mate -t source.makefile -
mate -t source.perl -
and after a little experimenting
mate -t text.tabular.csv -
work (even if source.perl did not come up in the grep) if the
corresponding bundle is installed.
And TextMate evaluates the shebang which also works in a pipe.
So that solves my problem, but I am still wondering if a complete list,
or the logic used should not be published somewhere...
The type <filetype>
argument for mate -t
is indeed the grammar’s root scope that you find by grepping the property lists.
You can also find this value either in the bundle editor, select a language grammar and it is the “Grammar” field in the drawer, alternatively, if you open a file of the desired type, press ⌃⇧P and a tool tip shows with the full scope of the insertion point, the first line is the grammar’s root scope, and what to use for mate -t
.
There is no full list because it would depend on what bundles you have installed/created. But I guess it wouldn’t be bad if there was a way for mate
to query the list of installed bundles. I’ve added a note about this, although the effort to implement this is probably not proportional with the benefit.