[TxMt] Re: Trying to figure how to color code a text file
MDX-LE
dj9027 at gmail.com
Sun Aug 23 02:58:24 UTC 2009
text-ed wrote:
>
> I am trying to make sense of the rules/language grammar in textmate. What
> language is it?
> Any help would be greatly appreciated.
>
I tried comprehending that a while ago.. still cant comprehend it.
Guess Its only for high funda programmers.
Butttt.... with some trial and error came up with this..,
Try this
1. Create a language and name it something like MyCSV
2. Then edit the language so that it has these changes
{ scopeName = 'text.html.csv';
fileTypes = ( );
foldingStartMarker = '/\*\*|\{\s*$';
foldingStopMarker = '\*\*/|^\s*\}';
patterns = (
{ name = 'keyword.control.untitled';
match = '^.+,';
},
{ name = 'string.quoted.double.untitled';
begin = '"';
end = '"';
patterns = (
{ name = 'constant.character.escape.untitled';
match = '".+$\n';
},
);
},
);
}
3. Set the language association of the CSV file opened in TM to "MyCSV"
4. Value 1 will be Blue and value 2 will be Green.
I dont know if thats the way to do it, but sure it will work !
HTH
--
View this message in context: http://www.nabble.com/Trying-to-figure-how-to-color-code-a-text-file-tp25088183p25099824.html
Sent from the textmate users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20090822/09b0c526/attachment-0002.html>
More information about the textmate
mailing list