Anyone Using Textmate To Work With PHP?
Posted by Stuart Herbert @ 11:59 PM, Fri 30 Nov 07
Filed under: Toolbox
18 Comments
My editor of choice for PHP for the last year or two has been phpEclipse. It’s the best compromise so far between IDE-like features (especially being able to search the entire code base, being able to have multiple projects open at once, and the absolute best class/function inspector in any PHP editor I’ve used so far - I can’t live without these features) and a text editor with acceptable performance (which is where Zend Studio has always lost out; can’t abide an editor that can’t keep up with my typing), syntax highlighting and code layout.
Unfortunately, phpEclipse doesn’t get released all that often (the last official release was 18 months ago now, although there are nightly CVS builds for folks who can afford to risk a broken PHP dev environment, and unfortunately I can’t afford that in my day job). That’s a long time to go without bug fixes and useful new features! It also suffers from that annoying Eclipse-ism of being unable to do anything for 10 minutes or so when you first open a project, whilst the workspace is rebuilt.
So I’m currently auditioning Textmate to see whether it can replace phpEclipse as my environment of choice. First impressions are pretty favourable (it supports projects, its fast, and the syntax highlighting is close enough) but it seems to lack a few useful features that phpEclipse has (like a class inspector - grrr, and being able to use phpdoc to provide context-sensitive help) and the performance seems to suck something awful when working on remote filesystems over 100mbit ethernet.
I was wondering if anyone else who reads Planet PHP has switched to Textmate, and if you’ve got any tips you can share on how to make Textmate a great PHP editing environment. If you do, please leave a comment below.
Did you enjoy this article? If so, subscribe to my RSS feed.

18 Comments
December 1st, 2007 at 12:50 am
Why don’t you use the PHP Development Tools (PDT)? I used PHP Eclipse quite a while before I switched to PDT for the same reasons as you want to use another editor. Give it a try if you want:
http://www.zend.com/pdt
December 1st, 2007 at 1:07 am
I’ve used two editors that I’m very fond of.
First of all Komodo. Its great because it has a built in PHP functionality (debugging, highlighting, etc…) as well as other languages like HTML, css, js, perl, etc.
The other one I use is PDT (zend.com/pdt) This is great - choose between zend debugger or xdebug, a ton of plugins - and you’ll be familiar with it with your eclipse experience. Plugin something like ‘aptana’ for advanced html/css/js support, and you’re golden.
Good luck!
December 1st, 2007 at 2:59 am
You say you use phpEclipse? Have you tried out the Zend Studio Neon Beta. It is essentially Eclipse PDT with many added new features. Worth a try. Yes, I have tried textmate, and I just like using IDE’s better.
December 1st, 2007 at 4:56 am
Surprising, there’s no free full fledged PHP IDE in the market. Zend, Nusphere etc., are commercial and as you mentioned PHPEclipse is not always upto date.
Have you tried IntelliJ IDEA.. they have some support for PHP through plugins, may be.
December 1st, 2007 at 7:00 am
[...] Check This Out! While looking through the blogosphere we stumbled on an interesting post today. Here’s a quick excerpt: My editor of choice for PHP for the last year or two has been phpEclipse. It’s the best compromise so far between IDE-like features (especially being able to search the entire code base, being able to have multiple projects open at once … [...]
December 1st, 2007 at 8:53 am
I’m not an IDE guy so I use TextMate for all of my coding. It’s the only editor that doesn’t get in the way. It has the project drawer and it’s fast. Bundles I use are PHP, PHPCodeCompletion and PHPDoc.
Also try shift+cmd+t when in any file. cmd+t can help too.
December 1st, 2007 at 9:06 am
I don’t do much php-development, but I can point out that TextMate does use phpdoc to provide context-sensitive help. Look in the PHP-Bundle. Default keyboard shortcut: ^H
December 1st, 2007 at 9:09 am
I agree Jake. I have tried Textmate but it is not real IDE. That is why I use Zend Studio at work and test PDT at home.
Textmate has many nice features but it lacks some which I’m comfort with IDEs.
December 1st, 2007 at 2:38 pm
TextMate is not in your way
I’ve been using TextMate the last year for most of my projects since I got my Macbook Pro. A web application project typically contain a lot of different languages and technologies and I just need an editor that play nice with them all on the same level. Not just doing on of them perfect.
TextMate is one of the first applications I start in the morning, and the last I close in the evening. I’ve used various IDE’s for PHP over the years. Different versions of PHPEdit, PHP Designer, Zend Studio, phpEclipse, PDT. For sure there’s a lot of nice features in all of them ranging from code completion, code analyze, profiling etc. to help you be more productive, but personally I mostly don’t need them.
TextMate is a lightweight, fast editor to work with and has a wide range of language support by default. In addition to a really clean interface (just the project layout and the editor).
But remember it’s just an editor. And I believe it would never even try to be an IDE. If I where to develop just in PHP Zend Studio or PDT would probably be a good choice, but todays web applications requires a mix - I would like to play with ActionScript and JavaScipt just the same way as PHP, XML, HTML and CSS.
I hope you have a great time with it
Best regards,
A TextMate fan
December 1st, 2007 at 2:42 pm
I tried TextMate for two weeks, the first one was very good, the second week I tried to use it for my job projects and it was a nightmare. However it’s an excellent editor for very small projects or solo scripts though.
After working with Eclipse PDT for the last year I’ve settle now with Komodo. It has improved my productivity quite a bit, the way it allows to store snippets, macros, external tools… with a project is very easy to understand and use.
December 1st, 2007 at 4:24 pm
When using remote fs’es, use ReMate, an extension - this makes the project tree “not update its status all the time”.
It’ll help that part.
Start making up new Templates. I just created a PHPUnit testcase boilerplate template.
Make your own Snippets. Your problem domain drags a few idioms with it — automate those with Snippets as soon as you identify the patterns.
December 1st, 2007 at 8:20 pm
http://www.aptana.com/
They are adding PHP support - so far it looks good.
Can be standalone or a Eclipse
December 2nd, 2007 at 9:01 am
Hi!
I am using PDT, it is really a great working environment. NEON is really better, there are a lot of killer function in it (http://blog.felho.hu/neon-zend-studio-for-eclipse.html), but in current stage it unusable: with a bigger project with many files it much more slower than PDT. But I think NEON is a really great direction from Zend.
Best Regards,
Felhő
December 2nd, 2007 at 5:17 pm
I’m using VIM, and it gives you all you want from an IDE plus being blazing fast. But you have to give it some days of attention before you’ll fall in a never ending love.
Some weeks ago I was already working for two hours before I noticed, that my mouse wasn’t plugged in…
December 4th, 2007 at 7:28 am
I’m the developer of the TextMate PHP bundle (and also the ReMate extension mentioned above). I used Zend Studio for quite some time and hated every moment of it – TextMate is an excellent editor which is very easily customisable (this is important to me). The PHP bundle has plenty of snippets/commands etc. to help writing PHP code, but there are also other, more generic items which help text/source editing in general. It’s also far preferable to do all your writing/editing in a single environment which can cope gracefully with all your needs.
A few tips:
* Check the Help command in the PHP bundle for some features.
* Use Control-Command-T, Command-T and Shift-Command-T
* Look through other bundles too, notable the Text and Source bundles
* An example of an invaluable command from the Source bundle is Shift-Command-Return – this adds a terminating semi-colon to the end of the line and creates and moves to a new line below (especially handy when you’re in the middle of nested parentheses)
* (Self-plug:) I post general TextMate tips and plug-ins to my blog on a semi-regular basis
* Check out some of the screencasts, for example: http://macromates.com/screencast/insert_html_tags.mov
Antti: you should remove the PHPCodeCompletion bundle, it’s very old and very deprecated – the PHP bundle has much better completion as standard now.
December 16th, 2007 at 4:25 am
[...] Anyone Using Textmate To Work With PHP? | Stu On PHP (tags: textmate) [...]
January 20th, 2008 at 8:01 pm
Can you debug in textmate?
May 22nd, 2008 at 8:09 pm
MRKisThatKid: No. Thats why my primary tool is Zend Studio and I use Textmate only for quick and small file editing.
Add Your Comments To This Article Using The Form Below
Your comments may not appear until they have been approved by a moderator.