I don't know why, but the SQL bundle wouldn't highlight "JOIN" as a keyword. It seems to have all of the other variants.
Index: Syntaxes/SQL.plist =================================================================== --- Syntaxes/SQL.plist (revision 11005) +++ Syntaxes/SQL.plist (working copy) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>fileTypes</key> @@ -229,7 +229,7 @@ </dict> <dict> <key>match</key> - <string>(?i:\b(select(\s+distinct)?|insert\s+(ignore\s+)?into| update|delete|from|set|where|group\sby|or|like|and|union(\s+all)?| having|order\sby|limit|(inner|cross)\s+join|straight_join|(left|right) (\s+outer)?\s+join|natural(\s+(left|right)(\s+outer)?)?\s+join)\b)</ string> + <string>(?i:\b(select(\s+distinct)?|insert\s+(ignore\s+)?into| update|delete|from|set|where|group\sby|or|like|and|union(\s+all)?| having|order\sby|limit|(inner|cross)\s+join|straight_join|(left|right) (\s+outer)?\s+join|natural(\s+(left|right)(\s+outer)?)?\s+join)\b| join)</string> <key>name</key> <string>keyword.other.DML.sql</string> </dict>
-- Jacob Coby
Yeah I know what everyone is thinking, another cry for TM2, nope.
All I want for Xmas is to get into a TM2 beta :)
Richard
On Sat, Dec 20, 2008 at 4:32 PM, Richard Ashwell rashwell@gmail.com wrote:
Yeah I know what everyone is thinking, another cry for TM2, nope.
All I want for Xmas is to get into a TM2 beta :)
Me, too but actually I'm thinking about how I can create with gmail a filter to directly such mails because it's a fruitless discussion.
Niels
And my wish is an easy way to communicate with command-line processes such as toplevels and compilers, and parse their errors like Emacs does, pointing you back into the text. Once that exists, TM will have officially superseded Emacs for compiling... unless it;s possible already? :)
Cheers, Alexy
On Dec 20, 2008, at 10:32 AM, Richard Ashwell wrote:
All I want for Xmas is to get into a TM2 beta :)
And my wish is to stop talking about TM2. It will be when it will be ;)
Sent from my iPhone
On 2008-12-20, at 22:13, Alexy Khrabrov deliverable@gmail.com wrote:
And my wish is an easy way to communicate with command-line processes such as toplevels and compilers, and parse their errors like Emacs does, pointing you back into the text. Once that exists, TM will have officially superseded Emacs for compiling... unless it;s possible already? :)
Cheers, Alexy
On Dec 20, 2008, at 10:32 AM, Richard Ashwell wrote:
All I want for Xmas is to get into a TM2 beta :)
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Dec 20, 2008, at 1:13 PM, Alexy Khrabrov wrote:
And my wish is an easy way to communicate with command-line processes such as toplevels and compilers, and parse their errors like Emacs does, pointing you back into the text. Once that exists, TM will have officially superseded Emacs for compiling... unless it;s possible already? :)
Have you seen Executor?
Look at the C.tmbundle's Run command. It Compiles and Runs C code, currently it doesn't bother to parse errors and link back to the source, but it would be pretty trivial to add a ruby block to do so.
—Alex
I would like Allan to prove that there are 11 dimensions, personally.
:P
On Sat, Dec 20, 2008 at 2:35 PM, Alex Ross tm-alex@rosiba.com wrote:
On Dec 20, 2008, at 1:13 PM, Alexy Khrabrov wrote:
And my wish is an easy way to communicate with command-line processes such as toplevels and compilers, and parse their errors like Emacs does, pointing you back into the text. Once that exists, TM will have officially superseded Emacs for compiling... unless it;s possible already? :)
Have you seen Executor?
Look at the C.tmbundle's Run command. It Compiles and Runs C code, currently it doesn't bother to parse errors and link back to the source, but it would be pretty trivial to add a ruby block to do so.
—Alex
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Alexy Khrabrov wrote:
And my wish is an easy way to communicate with command-line processes such as toplevels and compilers, and parse their errors like Emacs does, pointing you back into the text. Once that exists, TM will have officially superseded Emacs for compiling... unless it;s possible already? :)
Good news! Not only is it possible, it's easy. Open the bundle editor and create a new command. Set the input to "Nothing" and the output to "Show as HTML". Define the activation and scope as suits you.
Now, for the command itself. It needs to execute your compiler, parse the output, and convert it to HTML. The key is to turn the filename, line number, and column number into a 'txmt://' URL. When the HTML is displayed, clicking on such a URL will open the file in TextMate; or, if the file is already open, simply jump to the appropriate line and column.
You can do this in any scripting language you like. I use Perl for my example, simply because that's what I'm used to. So here's a quickie that I banged out in a few minutes to get you going. This simply compiles the current file using gcc, highlights errors in red and warnings in yellow, and makes links back to the source file.
----- Cut Here -----
#! /usr/bin/perl -w use strict; use IO::File; use HTML::Entities;
my $dir = $ENV{'TM_DIRECTORY'}; my $file = $ENV{'TM_FILENAME'}; my $path = $ENV{'TM_FILEPATH'}; my ($str);
chdir($dir); my $cmd = "gcc -o foo $file 2>&1 |"; my $fh = IO::File->new($cmd);
while (<$fh>) { chomp(); if (/^(.*?):(\d+):(\d+):\s*(error|warning):\s*(.*)$/) { my $file = $1; my $line = $2; my $col = $3; my $type = $4; my $msg = $5; $msg = encode_entities($msg); my $color = ($type eq 'error') ? "red" : "yellow"; my $url = sprintf 'txmt://open/?url=file://%s&line=%d&column=%d', $path, $line, $col; $str = "<span style="background-color:$color"><a href="$url">$file:$line:$col:</a> $type: $msg</span>"; } else { $str = encode_entities($_); } print $str . "<br>\n"; }
----- Cut Here -----
Enjoy your Christmas present!
On 22 Dec 2008, at 15:27, Steve King wrote:
while (<$fh>) { chomp(); if (/^(.*?):(\d+):(\d+):\s*(error|warning):\s*(.*)$/) { my $file = $1; my $line = $2; my $col = $3; my $type = $4; my $msg = $5; $msg = encode_entities($msg); my $color = ($type eq 'error') ? "red" : "yellow"; my $url = sprintf 'txmt://open/?url=file://%s&line=%d&column= %d', $path, $line, $col; $str = "<span style="background-color:$color"><a href="$url ">$file:$line:$col:</a> $type: $msg</span>"; } else { $str = encode_entities($_); } print $str . "<br>\n"; }
Shameless plug:
http://search.cpan.org/dist/TextMate-JumpTo/
:)
Hi Jacob,
On 18 Dec 2008, at 18:43, Jacob Coby wrote:
I don't know why, but the SQL bundle wouldn't highlight "JOIN" as a keyword. It seems to have all of the other variants.
A standalone JOIN without any modifiers, such as a LEFT or RIGHT JOIN, does not seen to be in the ANSI SQL specification. The SQL bundle grammar is written to (attempt to) conform to ANSI SQL, rather than having a grammar for each implementation. Of course, if you can cite a source which says otherwise then I will apply the patch.
Ciarán
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt sec 7.5 <joined table> "3) If a <qualified join> is specified and a <join type> is not specified, then INNER is implicit."
On Dec 30, 2008, at 4:55 PM, Ciarán Walsh wrote:
Hi Jacob,
On 18 Dec 2008, at 18:43, Jacob Coby wrote:
I don't know why, but the SQL bundle wouldn't highlight "JOIN" as a keyword. It seems to have all of the other variants.
A standalone JOIN without any modifiers, such as a LEFT or RIGHT JOIN, does not seen to be in the ANSI SQL specification. The SQL bundle grammar is written to (attempt to) conform to ANSI SQL, rather than having a grammar for each implementation. Of course, if you can cite a source which says otherwise then I will apply the patch.
Ciarán
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Jacob Coby
I’ve fixed this in r11088
On 30 Dec 2008, at 22:10, Jacob Coby wrote:
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt sec 7.5 <joined table> "3) If a <qualified join> is specified and a <join type> is not specified, then INNER is implicit."
On Dec 30, 2008, at 4:55 PM, Ciarán Walsh wrote:
Hi Jacob,
On 18 Dec 2008, at 18:43, Jacob Coby wrote:
I don't know why, but the SQL bundle wouldn't highlight "JOIN" as a keyword. It seems to have all of the other variants.
A standalone JOIN without any modifiers, such as a LEFT or RIGHT JOIN, does not seen to be in the ANSI SQL specification. The SQL bundle grammar is written to (attempt to) conform to ANSI SQL, rather than having a grammar for each implementation. Of course, if you can cite a source which says otherwise then I will apply the patch.
Ciarán
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Jacob Coby
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate