Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorsvenax
    • CommentTimeJan 25th 2007
     permalink

    Don’t know if this is a bug, feature request or simply me not “getting it”. Some grammars allow other languages to be embedded, e.g. PHP that can embed HTML, XML, and SQL in heredoc strings. This works fine as far as syntax highlighting goes, but ideally this would also make the tab triggers and shortcuts for the embedded langue available. This doesn’t happen though. Any thoughts?

  1.  permalink

    Give some report on what you are doing and what you expect to happen…

    • CommentAuthorsvenax
    • CommentTimeJan 25th 2007
     permalink

    OK, I have tested a bit more now. This is what I’ve tried:

    Create a new file and select HTML mode. Verify that HTML tab triggers and shortcuts work (OK). Insert <php ?> tags somewhere. Verify that PHP tab triggers and shortcuts work (they do). Check the scope ( source.php.embedded.html, text.html.basic). HTML triggers and shortcuts are not turned off inside the php tag however, but are globally available. Not optimal.

    Now create another file and select PHP mode. Insert echo <<<HTML HTML; somewhere and type some html inside the heredoc. Verify that it highlights properly (OK). Check the scope ( meta.scope.heredoc, source.php). No text.html however. And HTML triggers and shortcuts do not work.

    I have not used Textmate and I don’t know if the functionality I want is even possible. Perhaps I’ll go to the Macromates site and pester the people on the bundles forum about this ;)

  2.  permalink

    First result is a feature. However, there will be a way on how to avoid this.

    The second one turns out to be a bug in Intype.