This little patch fixes the syntax highlighting for strings with escaped characters in Tcl. In case anyone finds it useful.
Index: Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist =================================================================== --- Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist (revision 1502) +++ Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist (working copy) @@ -94,6 +94,8 @@ <string>"</string> <key>name</key> <string>string.quoted.double.tcl</string> + <key>swallow</key> + <string>\.</string> <key>patterns</key> <array> <dict>
-- pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
On 26/08/2005, at 20.59, Oscar Bonilla wrote:
This little patch fixes the syntax highlighting for strings with escaped characters in Tcl. In case anyone finds it useful.
Actually Yuhei Kuratomi recently alerted me to the problem of embedded quotes in Tcl strings, and I have updated the Tcl syntax on the svn repository.
Below is the patch (which does change a few things about embedded stuff in strings), but it's probably easier to just grab the file from svn.
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ Tcl.tmbundle/Syntaxes/Tcl.plist
Index: /Users/duff/Library/as/TextMate/Bundles/Tcl.tmbundle/ Syntaxes/Tcl.plist =================================================================== --- /Users/duff/Library/as/TextMate/Bundles/Tcl.tmbundle/Syntaxes/ Tcl.plist (revision 1590) +++ /Users/duff/Library/as/TextMate/Bundles/Tcl.tmbundle/Syntaxes/ Tcl.plist (working copy) @@ -100,10 +100,33 @@
<key>comment</key> <string>FIXME not sure this is the proper way to do Tcl escape sequences --Allan</string> <key>match</key> - <string>([abfnrtv]|0d{2}|x[a-fA-F]{2})</string> + <string>\([abfnrtv"\]|0\d{2}|x[a-fA-F0-9]{2}|u [a-fA-F0-9]{4})</string> <key>name</key> <string>constant.character.escape.tcl</string> </dict> + <dict> + <key>comment</key> + <string>FIXME what are legal variable characters? --Allan</string> + <key>match</key> + <string>$[a-zA-Z]+</string> + <key>name</key> + <string>variable.other.tcl</string> + </dict> + <dict> + <key>begin</key> + <string>[</string> + <key>end</key> + <string>]</string> + <key>name</key> + <string>source.tcl.embedded</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>source.tcl</string> + </dict> + </array> + </dict> </array> </dict> </array>
Thanks! However, I'm getting this error when checking out from the repo:
dirac Syntaxes $ svn update svn: REPORT request failed on '/svn/Bundles/!svn/vcc/default' svn: REPORT of '/svn/Bundles/!svn/vcc/default': 400 Bad Request (http://macromates.com)
On Aug 26, 2005, at 12:16 PM, Allan Odgaard wrote:
On 26/08/2005, at 20.59, Oscar Bonilla wrote:
This little patch fixes the syntax highlighting for strings with escaped characters in Tcl. In case anyone finds it useful.
Actually Yuhei Kuratomi recently alerted me to the problem of embedded quotes in Tcl strings, and I have updated the Tcl syntax on the svn repository.
Below is the patch (which does change a few things about embedded stuff in strings), but it's probably easier to just grab the file from svn.
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ Tcl.tmbundle/Syntaxes/Tcl.plist
Index: /Users/duff/Library/as/TextMate/Bundles/Tcl.tmbundle/ Syntaxes/Tcl.plist =================================================================== --- /Users/duff/Library/as/TextMate/Bundles/Tcl.tmbundle/Syntaxes/ Tcl.plist (revision 1590) +++ /Users/duff/Library/as/TextMate/Bundles/Tcl.tmbundle/Syntaxes/ Tcl.plist (working copy) @@ -100,10 +100,33 @@
<key>comment</key> <string>FIXME not sure this is the proper way
to do Tcl escape sequences --Allan</string> <key>match</key>
<string>\([abfnrtv]|0d{2}|x[a-fA-F]{2}\)</string>
<string>\\([abfnrtv"\\]|0\d{2}|x[a-fA-F0-9]{2}|
u[a-fA-F0-9]{4})</string> <key>name</key> <string>constant.character.escape.tcl</string> </dict>
<dict>
<key>comment</key>
<string>FIXME what are legal variable
characters? --Allan</string>
<key>match</key>
<string>\$[a-zA-Z]+</string>
<key>name</key>
<string>variable.other.tcl</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>end</key>
<string>\]</string>
<key>name</key>
<string>source.tcl.embedded</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.tcl</string>
</dict>
</array>
</dict> </array> </dict>
</array>
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
-- pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
On 26/08/2005, at 21.25, Oscar Bonilla wrote:
Thanks! However, I'm getting this error when checking out from the repo:
dirac Syntaxes $ svn update svn: REPORT request failed on '/svn/Bundles/!svn/vcc/default' svn: REPORT of '/svn/Bundles/!svn/vcc/default': 400 Bad Request (http://macromates.com)
hmm… I've seen that a few times before (quoted by users), either: 1) you're behind a proxy 2) the URL you're using is wrong 3) svn is strange and you should just try again 4) something else
It seems Squid caches don't like the HTTP REPORT method that SubVersion uses for svn update...
2005/08/26 12:36:42| parseHttpRequest: Unsupported method 'REPORT'
I guess I'll have to wait until I'm home to get the update...
On Aug 26, 2005, at 12:30 PM, Allan Odgaard wrote:
On 26/08/2005, at 21.25, Oscar Bonilla wrote:
Thanks! However, I'm getting this error when checking out from the repo:
dirac Syntaxes $ svn update svn: REPORT request failed on '/svn/Bundles/!svn/vcc/default' svn: REPORT of '/svn/Bundles/!svn/vcc/default': 400 Bad Request (http://macromates.com)
hmm… I've seen that a few times before (quoted by users), either:
- you're behind a proxy
- the URL you're using is wrong
- svn is strange and you should just try again
- something else
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
-- pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
On 26/08/2005, at 21.42, Oscar Bonilla wrote:
It seems Squid caches don't like the HTTP REPORT method that SubVersion uses for svn update... 2005/08/26 12:36:42| parseHttpRequest: Unsupported method 'REPORT'
Don't seem to remember that being a method in HTTP/1.1, is it? Then I don't blame a proxy for rejecting it, cause then it's non-http going through a http proxy :-p
-- Sune.