Hi,
The latest Textmate helpfully highlights SQL in comments, this is great apart from with Joomla/Mambo code which actually uses a hash in the table name (this gets replaced before it gets as far as mysql) - this hash is recognised as a comment, so the end of the string is ignored and the rest of your file is treated as a comment.
The tables names are referred to as #__mytable. I'm sure if this isn't the best solution but a quick fix is to open
/Applications/Textmate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Syntaxes/SQL.plist
in Property Editor and navigate to
/Root/repository/comments/patterns/1/match
and change the regex from
(#)?.*$\n?
to
(#)[^_][^_]?.*$\n?
Any better solutions gratefully accepted.
Thanks
jeb
On Jul 9, 2007, at 6:37 AM, Jeremy Wilkins wrote:
I'm sure if this isn't the best solution but a quick fix is to open
/Applications/Textmate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Syntaxes/SQL.plist
in Property Editor [...]
Uh... maybe I'm having just a brain dead day today but why wouldn't you just change the regex in the bundle editor?
- Cliff
Probably because I didn't realise I could :) Guess I'll do that next time.
--- Jeremy Wilkins
On 17 Jul 2007, at 01:45, Cliff Pruitt wrote:
On Jul 9, 2007, at 6:37 AM, Jeremy Wilkins wrote:
I'm sure if this isn't the best solution but a quick fix is to open
/Applications/Textmate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Syntaxes/SQL.plist
in Property Editor [...]
Uh... maybe I'm having just a brain dead day today but why wouldn't you just change the regex in the bundle editor?
- Cliff
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Ah... :-) OK well then I guess that'd be a good enough reason.
Yeah, in the future just open the bundle you want to edit and change the language definition. I think it has the added benefit (someone correct me if I'm wrong) of preserving the original version and saving the modifications to the bundle as a copy unique to your user, at least that's how I understand it. That might only apply to new bundle items you create though, I've never been completely sure how that works.
- Cliff
On Jul 17, 2007, at 9:29 AM, Jeremy Wilkins wrote:
Probably because I didn't realise I could :) Guess I'll do that next time.
Jeremy Wilkins
On 17 Jul 2007, at 01:45, Cliff Pruitt wrote:
On Jul 9, 2007, at 6:37 AM, Jeremy Wilkins wrote:
I'm sure if this isn't the best solution but a quick fix is to open
/Applications/Textmate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Syntaxes/SQL.plist
in Property Editor [...]
Uh... maybe I'm having just a brain dead day today but why wouldn't you just change the regex in the bundle editor?
- Cliff
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate