| Author |
Message |
|
| thelorax |
Posted: Fri Apr 13, 2007 7:28 pm |
|
|
|
Registered User
Joined: 29 Mar 2007
Posts: 39
|
| Whenever I open a php file it opens as type html. This is fine in some cases but a pain in others do to some syntax highlighting rules I have created in my theme. Is there anyway to change this? |
|
|
| Back to top |
|
| thelorax |
Posted: Sat Apr 14, 2007 6:26 pm |
|
|
|
Registered User
Joined: 29 Mar 2007
Posts: 39
|
is there some type of config file I could edit?
anyone? |
|
|
| Back to top |
|
| pnomolos |
Posted: Sat Apr 14, 2007 10:35 pm |
|
|
|
Registered User
Joined: 22 Feb 2007
Posts: 136
|
Howdy,
At this time I don't believe there's anything you can edit ... I did a bunch of poking around yesterday to see what I could uncover, but nothing came up. Alexander may have it hidden somewhere but if so he did an excellent job of hiding it . |
|
|
| Back to top |
|
| thelorax |
Posted: Sun Apr 15, 2007 6:32 pm |
|
|
|
Registered User
Joined: 29 Mar 2007
Posts: 39
|
| thx for the reply. maybe in the next build there will be something. this is particularly annoying because there is no shortcut to switch to php syntax so i have to to use the mouse to select php syntax whenever i open a php file. |
|
|
| Back to top |
|
| Lunatic |
Posted: Mon Apr 16, 2007 2:26 am |
|
|
|
Registered User
Joined: 16 Apr 2007
Posts: 5
|
It _can_ be done!
Open C:\Program Files\e\Bundles\HTML.tmbundle\Syntaxes\HTML.plist and delete line 12 (<string>php</string>).
Then open C:\Program Files\e\Bundles\PHP.tmbundle\Syntaxes\PHP.plist
and add this after line 4 (<dict>)
Code: <key>fileTypes</key>
<array>
<string>php</string>
</array>
Now close and re-open E and all php files should now be opened with the right bundle |
|
|
| Back to top |
|
| pnomolos |
Posted: Mon Apr 16, 2007 2:41 am |
|
|
|
Registered User
Joined: 22 Feb 2007
Posts: 136
|
Hi Lunatic,
Thanks for answering that one - I had been poking around in there and on the TextMate mailing lists but hadn't figured anything definitive out Glad you cleared that up. |
|
|
| Back to top |
|
| Lunatic |
Posted: Mon Apr 16, 2007 5:43 am |
|
|
|
Registered User
Joined: 16 Apr 2007
Posts: 5
|
| Looks like no change was really needed. The html bundle automatically switches to the php bundle when the cursor is between <php> it just doesn't update selected bundle. It also switches to the CSS, Javascript and Smarty bundles the same way. Very cool. |
|
|
| Back to top |
|
| thelorax |
Posted: Wed Apr 18, 2007 3:15 am |
|
|
|
Registered User
Joined: 29 Mar 2007
Posts: 39
|
Thanks a lot lunatic. The change WAS needed as .php files were opening with the HTML bundle selected by default (even though php bundles still worked). With this fix .php files open with the PHP bundle selected by default.
This fix should really be placed in the next build of E. |
|
|
| Back to top |
|
| pnomolos |
Posted: Wed Apr 18, 2007 6:29 am |
|
|
|
Registered User
Joined: 22 Feb 2007
Posts: 136
|
| Alexander is keeping compatibility with TextMate, which does the same thing (PHP opens under the HTML bundle, but any sections within the <?php ?> tags switch to the PHP bundle) |
|
|
| Back to top |
|
| bjchrist |
Posted: Tue Sep 04, 2007 8:41 pm |
|
|
|
Beta tester
Joined: 01 Aug 2005
Posts: 277
Location: Denmark
|
|
| Back to top |
|
| Kryon |
Posted: Mon Apr 07, 2008 1:59 pm |
|
|
|
Registered User
Joined: 16 Aug 2007
Posts: 14
Location: Copenhagen, DK
|
Hey
Just bumping this thread, as this problem returned in the lastest 1.0.15 update - I guess the HTML and/or PHP bundle got updated... |
|
|
| Back to top |
|
| BrandX |
Posted: Thu Apr 10, 2008 2:32 am |
|
|
|
Registered User
Joined: 10 Apr 2008
Posts: 8
|
| Just a confirmation, that I for some reason can't get my php files to open in php mode without manually switching them. |
|
|
| Back to top |
|
| borland |
Posted: Thu Apr 10, 2008 8:56 pm |
|
|
|
Registered User
Joined: 20 Nov 2006
Posts: 410
|
Ignore the fact that it says HTML at the bottom, it's supposed to.
There's no such thing as just a PHP file, they're all HTML files with <? delimiting the PHP code. Even if you have no HTML at all, php still makes you use <?, so it's fair enough for E to follow this rule.
E can and does make all the PHP stuff available once you're in a <? block |
|
|
| Back to top |
|
| BrandX |
Posted: Fri Apr 11, 2008 4:43 am |
|
|
|
Registered User
Joined: 10 Apr 2008
Posts: 8
|
borland wrote: Ignore the fact that it says HTML at the bottom, it's supposed to.
There's no such thing as just a PHP file, they're all HTML files with <? delimiting the PHP code. Even if you have no HTML at all, php still makes you use <?, so it's fair enough for E to follow this rule.
E can and does make all the PHP stuff available once you're in a <? block
It wasn't when I was in the files... I had to manually click it to php. |
|
|
| Back to top |
|
| borland |
Posted: Sun Apr 13, 2008 9:14 pm |
|
|
|
Registered User
Joined: 20 Nov 2006
Posts: 410
|
Quote: It wasn't when I was in the files... I had to manually click it to php.
The indicator in the status bar will still say HTML, because that's for the entire file. Ignore it.
When you're inside a <? block, all the PHP stuff will be available. for example type mysql and press ctrl+space and observe all the auto-completed PHP functions, and syntax hilighting.
If your E is *not* doing the PHP syntax hilighting, or autocompleting, *then* there is a problem, either post it in the bugs forum along with details as to how to reproduce, or log a bug in the bug tracker
Cheers. |
|
|
| Back to top |
|
|
|