GB
unread,Nov 28, 2010, 9:32:32 PM11/28/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cftextmate
Hi All,
I'm really glad to hear fresh activity about Textmate. Over the years
I have tweaked my installation and I am very pleased with it.
There was one point in time where I dig pretty deep into the bundle
language definitions and added a number of changes that really helped
my code syntax highlighting.
In the Bundle Editor (CTRL+OPT+CMD+B), filter for Languages in the
drop-down menu at the top, and click on the one (should only be one
per bundle as far as I know). Mine is in the old Coldfusion bundle, I
forget where I originally got it. Anyway, in there, about half way
down, inside the section where it says "Repository = {" I have added
a new definition as follows:
cftag = {
name = 'meta.tag.cfml';
begin = '</?(?i:cf)';
end = '>';
patterns = (
{ include = '#cftag'; },
{ name = 'string.quoted.double.html';
contentName = 'meta.toc-list.id.html';
begin = '"';
end = '"';
patterns = (
{ include = '#embedded-code'; },
{ include = '#entities'; },
);
},
{ name = 'string.quoted.single.html';
contentName = 'meta.toc-list.id.html';
begin = "'";
end = "'";
patterns = (
{ include = '#embedded-code'; },
{ include = '#entities'; },
);
},
);
};
Note the first line inside the body "name = 'meta.tag.cfml';". with
that 'meta.tag.cfml' hierarchy, or handle, whatever you want to call
it, I was able to add a new line in the (CMD+,[COMMA]) Preferences >
Fonts & Colors for "cfml meta" with the SCOPE SELECTOR being
"meta.tag.cfml,source.sql.embedded.html" and set the color to be
red.
Adding that set apart all CFML tags as a different color from all HTML
tags. It makes the syntax highlighting stronger and easier to read.
I just tested out the new Railo 3.2 bundle and it doesn't have any
syntax highlighting separating CFML from HTML. So I immediately went
back to my old custom version.
A few years ago when I pulled together that language definition pasted
above I barely knew what I was doing.
I throw this out there because it was the buggest struggle when I
first switch to a Mac and Textmate.