It seems the syntax parsing chokes on heredocs, code provided below
<?php $xmlstr = <<<XML <?xml version='1.0'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> </character> <plot> So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a documentary. </plot> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> </movies> XML;
$xml = simplexml_load_string($xmlstr);
echo "<p>" . $xml->movie[0]->plot . "</p>";
?>
example taken and trimmed slightly from http://se.php.net/simplexml
Andreas
I have that same version, and I don't think I've played around with the syntax colouring schemes ... it works in neither html or php languge mode. hmmm, don't think I can say much more
Andreas
On Oct 8, 2005, at 10:38 , Allan Odgaard wrote:
On 08/10/2005, at 10.30, Andreas Wahlin wrote:
It seems the syntax parsing chokes on heredocs, code provided below
Looks fine for me (r513).
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
On Oct 8, 2005, at 3:54 AM, Andreas Wahlin wrote:
I have that same version, and I don't think I've played around with the syntax colouring schemes ... it works in neither html or php languge mode. hmmm, don't think I can say much more
Are you using an svn checkout? If so is it up-to-date?
Are you using an svn checkout? If so is it up-to-date?
No checkouts. Hm, I tried to delete the PHP bundles in my ~/ library ... and it seemed to solve it.
Ah, at some point you made a change to the PHP syntax, saving a local copy. Once you have a local version of the syntax you won't get any updates to the syntax.
Michael Sheets wrote:
Are you using an svn checkout? If so is it up-to-date?
No checkouts. Hm, I tried to delete the PHP bundles in my ~/library ... and it seemed to solve it.
Ah, at some point you made a change to the PHP syntax, saving a local copy. Once you have a local version of the syntax you won't get any updates to the syntax.
it would be nice if there was a way to make minor edits but still inherit improvements automatically. can you overrride just one file/setting in the bundle?
Ah, at some point you made a change to the PHP syntax, saving a local copy. Once you have a local version of the syntax you won't get any updates to the syntax.
it would be nice if there was a way to make minor edits but still inherit improvements automatically. can you overrride just one file/ setting in the bundle?
That's what happens, only the changed items in a Bundle are saved to ~/Library, the other items will keep seeing any changes. However the syntax is one 'item' so a change to it blocks out updates to the syntax.
That's what happens, only the changed items in a Bundle are saved to ~/Library, the other items will keep seeing any changes. However the syntax is one 'item' so a change to it blocks out updates to the syntax.
That is not so great actually, since you miss out on "official" updates. It would be nice to have something like "view differences" or something of the like.
Andreas
On Sat, Oct 8, at 3:27 PM, Andreas Wahlin wrote:
That's what happens, only the changed items in a Bundle are saved to ~/Library, the other items will keep seeing any changes. However the syntax is one 'item' so a change to it blocks out updates to the syntax.
That is not so great actually, since you miss out on "official" updates. It would be nice to have something like "view differences" or something of the like.
Actually there is a solution for languages. You can define your additions in a new bundle, then include the original. As an example my Perl language definition loos like this (deleting most of my additions for brevity):
{ scopeName = 'source.perl.gerd'; firstLineMatch = '^#!.*\bperl\b'; fileTypes = ( 'pl', 'pm', 'pod' ); foldingStartMarker = '(/*|({|[|()\s*$)'; foldingStopMarker = '(*/|^\s*(}|]|)))'; patterns = ( { name = 'entity.name.class'; match = '^\s*package\s+.*$\n?'; }, { include = 'source.perl'; }, ); }
Now all changes to the official updates are still picked up.
Gerd
Actually there is a solution for languages. You can define your additions in a new bundle, then include the original. As an example my Perl language definition loos like this (deleting most of my additions for brevity):
{ scopeName = 'source.perl.gerd'; firstLineMatch = '^#!.*\bperl\b'; fileTypes = ( 'pl', 'pm', 'pod' ); foldingStartMarker = '(/*|({|[|()\s*$)'; foldingStopMarker = '(*/|^\s*(}|]|)))'; patterns = ( { name = 'entity.name.class'; match = '^\s*package\s+.*$\n?'; }, { include = 'source.perl'; }, ); }
Ah, that's pretty smart. This does only apply to language though right? Macros, snippets etc are each "unique", so adding my own snippets will still allow me to catch up on official ones ... as long as I don't change the official ones of course .. It's not entirely ideal though to have to go through the process above, on the other hand, if one edits the language, one knows what one does.
Andreas
On 09/10/2005, at 14.58, Andreas Wahlin wrote:
Ah, that's pretty smart. This does only apply to language though right? Macros, snippets etc are each "unique", so adding my own snippets will still allow me to catch up on official ones ... as long as I don't change the official ones of course ..
Yes
It's not entirely ideal though to have to go through the process above, on the other hand, if one edits the language, one knows what one does.
Yes -- though if you want the ability to diff and merge, you could do a svn co of the grammar you want to edit, and then use the capabilities of svn to merge, diff, a.s.o. in the future -- but Gerds suggestion is much better, since that's a one-time fix, where with diff and merging, you would potentially have to handle merge conflicts each time the official grammar gets changed.
All that said, it's clear that the bundle editor needs to indicate, when the user is running with a non-default bundle item, _and_ the item has been updated _after_ the user did his “fork”, that there is an updated default value.