Quick dumb question:
Why is it that when I select "XHTML" bundle, I get no PHP highlighting at all, and when I select "PHP" bundle, I get no HTML highlighting at all?
How can I get both at the same time? I'm having to constantly switch back and forth :-(
Sean
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On 31.10.2006, at 12:32, Sean Schertell wrote:
Quick dumb question:
Why is it that when I select "XHTML" bundle, I get no PHP highlighting at all, and when I select "PHP" bundle, I get no HTML highlighting at all?
You should use the “HTML” language grammar. PHP is an extension to this and gets included automatically. I’ve never used the “XHTML” Language (which is in the HTML bundle). If you think anything does not work well with the Language set to “HTML” just write back here. Also you might be wanting to set the “TM_XHTML” Shell variable to “/” in TextMate General Preferences when you are only working with XHTML.
Kind regards, Soryu.
Thanks for the tip Soryu but I'm a little confused. I should use the HTML bundle instead of the XHTML bundle when I'm editing XHTML? One thing I noticed straight away is that when I use the Ctl-Return shortcut for a line break, I get the old "<br>" instead of XHTML valid "<br />".
Surely, it's not an unusual requirement to edit documents with XHTML and PHP in them -- is there really no way to get TM to play nice with this combination?
Sean
On Oct 31, 2006, at 10:27 PM, Soryu wrote:
On 31.10.2006, at 12:32, Sean Schertell wrote:
Quick dumb question:
Why is it that when I select "XHTML" bundle, I get no PHP highlighting at all, and when I select "PHP" bundle, I get no HTML highlighting at all?
You should use the “HTML” language grammar. PHP is an extension to this and gets included automatically. I’ve never used the “XHTML” Language (which is in the HTML bundle). If you think anything does not work well with the Language set to “HTML” just write back here. Also you might be wanting to set the “TM_XHTML” Shell variable to “/” in TextMate General Preferences when you are only working with XHTML.
Kind regards, Soryu.
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
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On 1. Nov 2006, at 02:25, Sean Schertell wrote:
Thanks for the tip Soryu but I'm a little confused. I should use the HTML bundle instead of the XHTML bundle when I'm editing XHTML?
There is no (official) XHTML bundle. Only an HTML bundle and an Experimental Strict XHTML grammar (on the repository) -- the latter is strict, and thus does not allow any stuff that would be filtered out (or evaluated) by a preprocessor (other than XML preprocessing instructions), which includes PHP.
One thing I noticed straight away is that when I use the Ctl-Return shortcut for a line break, I get the old "<br>" instead of XHTML valid "<br />".
Yes -- all tags inserted now insert by default as HTML, unless you set TM_XHTML to “/” (or “ /” if you want to produce somewhat HTML compatible XHTML) in the Shell Variables preferences that Soryu mentioned.
In the future this variable will likely automatically be set for documents with an XHTML document type, but for now, you need to set it yourself.
Surely, it's not an unusual requirement to edit documents with XHTML and PHP in them -- is there really no way to get TM to play nice with this combination?
What was not nice about using the HTML grammar, other than having HTML shown in the status bar (but I assume that you are anyway sending these as text/html, so effectively you are creating documents which are interpreted as HTML (not XHTML) by the browsers which receive them, even though you are filling them with slashes ;) ).
Thanks Allan,
You're right, adding the shell variable seems to fix things right up. I noticed that the ctl-return shortcut now writes a break tag like this "<br/>" rather than with a space preceding the backslash like this: "<br />" -- slightly off-topic, but is this correct? I thought read somewhere that you need that space for full cross-browser compatibility or something. No?
Sean
On Nov 1, 2006, at 10:38 AM, Allan Odgaard wrote:
On 1. Nov 2006, at 02:25, Sean Schertell wrote:
Thanks for the tip Soryu but I'm a little confused. I should use the HTML bundle instead of the XHTML bundle when I'm editing XHTML?
There is no (official) XHTML bundle. Only an HTML bundle and an Experimental Strict XHTML grammar (on the repository) -- the latter is strict, and thus does not allow any stuff that would be filtered out (or evaluated) by a preprocessor (other than XML preprocessing instructions), which includes PHP.
One thing I noticed straight away is that when I use the Ctl- Return shortcut for a line break, I get the old "<br>" instead of XHTML valid "<br />".
Yes -- all tags inserted now insert by default as HTML, unless you set TM_XHTML to “/” (or “ /” if you want to produce somewhat HTML compatible XHTML) in the Shell Variables preferences that Soryu mentioned.
In the future this variable will likely automatically be set for documents with an XHTML document type, but for now, you need to set it yourself.
Surely, it's not an unusual requirement to edit documents with XHTML and PHP in them -- is there really no way to get TM to play nice with this combination?
What was not nice about using the HTML grammar, other than having HTML shown in the status bar (but I assume that you are anyway sending these as text/html, so effectively you are creating documents which are interpreted as HTML (not XHTML) by the browsers which receive them, even though you are filling them with slashes ;) ).
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
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On Oct 31, 2006, at 5:54 PM, Sean Schertell wrote:
You're right, adding the shell variable seems to fix things right up. I noticed that the ctl-return shortcut now writes a break tag like this "<br/>" rather than with a space preceding the backslash like this: "<br />" -- slightly off-topic, but is this correct? I thought read somewhere that you need that space for full cross- browser compatibility or something. No?
You would want their to be a space before the / in the variable.
And I have to admit, while I understand the argument against serving XHTML as text/html (that Allan was alluding to) I don't agree with it. If you code clean XHTML and serve it as text/html and don't do the silly user related mistakes that Ian Hickson brings up then the large majority of his issues with it are quite simply mute.
You can read Ian Hickson's deal here: http://hixie.ch/advocacy/xhtml
Brad Fults has a great response here: http://h3h.net/2005/12/xhtml-harmful-to-feelings/
And of course the comments on Brad Fults' post are full of people who feel either way. Personally I'm still using XHTML. :)
Jamie
_______________________________________________________________________ Email: jamie@methnen.com Homepage: http://www.methnen.com
"And I always go to pieces. And I have it in my mind, that the sky is tall and heavy, when I could be brave." -Karen Peris (Brave)
"I want to find where the maid in the street is pouring her wine, I heard she takes you in and gives you the words you need said. If you'll be her brother, she'll kiss you like a sister. She'll even be your mother, for now." -Matt Slocum (Sister, Mother)
"And we are drowned." -Annie Dillard (Tickets For a Prayer Wheel) _______________________________________________________________________