[TxMt] Paging a Bundle expert... (modifying SQL syntax colors debug)
Paul Nordstrom August
paul at archivistes.com
Tue Jan 25 19:21:16 UTC 2005
hi everyone
the bad news is that the latest beta (or how I installed it) ended up
deleting all my previous Custom snippets, macros etc. The good news I
guess is that I'm re-doing them (not so many anyway) in a much better
way :)
Separately I wanted to adapt the default SQL to colorize some of the
COLLATE and CHARSET data, partly just as a tutorial. My CocoaMySQL
creates table definitions including the following (unfortunately with
the "`" included), e.g.:
> `user` varchar(20) collate utf8_bin default NULL,
> [...]
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin
I wanted to offset the collate and CHARSET content so I cut-and-paste
within the SQL bundle to create the following:
> <dict>
> <key>foregroundColor</key>
> <string>#ff3300</string>
> <key>match</key>
>
> <string>^\s*\w+\s+(collate|utf8_bin|DEFAULT|CHARSET|utf8|COLLATE)\s*</
> string>
> <key>name</key>
> <string>Charset Types</string>
> </dict>
Alas nothing happens ;)
Could anyone give me a hand? This is hardly urgent, but I am just
curious what I am doing wrong... FYI I based it on the following; I'm
hardly a regex expert or anything but I thought I knew what was going
on...
Thanks!
Paul
> <dict>
> <key>foregroundColor[1]</key>
> <string>#CCBA33</string>
> <key>match</key>
>
> <string>^\s*\w+\s+(bigint|bigserial|bit|bit\svarying\(\d+\)|boolean|box
> |bytea|character\s(varying)?
> \(\d+\)|char\(\d+\)|var\schar\(\d+\)|cidr|circle|date|datetime|double\s
> precision|inet|int\(\d+\)|integer|interval\(\d+\)|line|lseg|macaddr|mon
> ey|numeric(\(\d+,\d+\))?
> |oid|path|point|polygon|real|smallint|serial|text|times(\(\d+\))(\swith
> outstimeszone)?|timestamp(s(\(\d+\))(\swithoutstimeszone)?)?
> |varchar\(\d+\))\s*</string>
> <key>name</key>
> <string>Data Types</string>
> </dict>
More information about the textmate
mailing list