Anyone Using Textmate To Work With PHP?

Posted by Stuart Herbert on November 30th, 2007 in Toolbox.

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.

25 Comments

  1. Adrian says:
    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

  2. Aaron Saray says:
    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!

  3. Jake says:
    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.

  4. Muthu Ramadoss says:
    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.

  5. php cute » Anyone Using Textmate To Work With <b>PHP</b>? says:
    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 … […]

  6. Antti says:
    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.

  7. Erik Wessel-Berg says:
    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

  8. Teal says:
    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.

  9. Knut Urdalen says:
    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

  10. DrSlump says:
    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.

  11. Olle Jonsson says:
    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.

  12. D says:
    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

  13. Gergely Hodicska says:
    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?

  14. Thomas Koch says:
    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…

  15. Ciarán Walsh says:
    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.

  16. links for 2007-12-16 | ???blog says:
    December 16th, 2007 at 4:25 am

    […] Anyone Using Textmate To Work With PHP? | Stu On PHP (tags: textmate) […]

  17. MRKisThatKid says:
    January 20th, 2008 at 8:01 pm

    Can you debug in textmate?

  18. Tero says:
    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.

  19. Thomas van den Berg says:
    October 15th, 2008 at 4:37 pm

    I use nothing but TextMate for php, because it’s lean but powerful.

  20. tidelipop says:
    December 20th, 2008 at 4:01 pm

    Debugging is essential to me. I use PHPed in a Wnidows environment today, but my next computer will likely be an iMac so I’m looking for a good environment to develop php-scripts in. I like what I’ve seen with Textmate, but I would like to see a php debug plugin for it!

  21. Son Nguyen says:
    December 27th, 2008 at 7:34 pm

    I’m learning TextMate and find its customization ability to be very powerful and cool once you learn it properly.

  22. Jim Ekleberry says:
    January 11th, 2009 at 3:15 am

    I have been using Zend Studio since v4 but recently started working on a Mac OS X system. The first thing I did was install Zend Studio for Eclipse and then started looking for an editor for small edits and working with YAML, JS, HTML, and CSS files and found TextMate. I slowly started using TextMate more and more and now use it exclusively and have uninstalled ZS for Eclipse. I find it invaluable for everything that I do on a daily basis (i.e. developing web sites and all the different files that entails, server administration, shell scripting, notes and documentation, etc). Instead of opening and closing a lot of different applications I can use just one making me extremely productive.

  23. Matthieu Lalonde says:
    December 14th, 2009 at 2:45 am

    Seriously!!! I want it!!! Notepad++ has a plugin for it! I’ve been working with PHPed recently, I don’t like it. I tried Eclipse before, some thing and IntelliJ also. Nope nope nope, all I want is an editor and a console…. and the debugger :/ I think this thing is like TextMate 2, it’ll never come 🙁

  24. jd- says:
    April 5th, 2010 at 7:04 pm

    I use textmate for all my xhtml/css/js/php needs…I can type very fast and really don’t need a full fledge IDE for pretty much any website and believe me there are some very complicated ones we have built. The only reason I can think of to use an IDE is if I were building enterprise web applications in PHP. But, if I were doing these, and I have a few times. I’d rather just write them in xcode using c++ or python. This or vis studio is what we used for computer science classes anyhow.

  25. AJ says:
    March 23rd, 2011 at 9:03 pm

    yes, textmate doesn’t get in your way when it doesn’t hung up or takes 1 minute to do a search/replace on a 10MB file that ZendStudio, or even TextWrangler does in 3 seconds.

This Month

November 2007
M T W T F S S
« Oct   Dec »
 1234
567891011
12131415161718
19202122232425
2627282930