I’ve switched from Vim to netbeans in the past 9 months or so – I’ve been using Vim for 5+ years before that and finding an editor to beat it wasn’t easy. Main aim was to get better code completion, plus whichever editor I used had to have ‘hippie search‘ – this speeds up coding no end. Tried eclipse PDT along the way but found that too slow.
Ultimately netbeans persuaded me to convert. Here are some tips for using it:
General tips
- Use at least 6.8 beta version of netbeans – there are performance improvements for code completion which increase code completion a lot. If you’ve tried 6.7/6.5 – try again with the 6.8 beta+, especially with large projects.
- Enable hippie search – The default keys are ctrl+k and ctrl+shift+k – If you’re a Vim person, change these to ctrl+p and ctrl+n. The ‘Actions’ in the keymap editor are ‘Next matching word’ and ‘Previous matching word’
- Initiate code completion manually – use ctrl+space (default) I find the auto code completion popup just gets in the way. YMMV.
- Use Navigate menu – this allows you to find files/classes/functions/methods in your code almost instantly
- phpdoc your code: this allows code completion to work in places it otherwise could not
Symfony
- Ignore ‘test’ directories – make sure you ignore certain dirs in symfony. This makes code completion ignore classes under those directories. I have problems with it picking up classes not in our project e.g. sfContext can get confused with sfContextMock from the tests.
- Symfony is supported in netbeans 6.8M2+ see http://blogs.sun.com/netbeansphp/entry/initial_symfony_support
30/10/2009 at 11:58 |
Glad you like NB! We’ve got a screencast up demonstrating Symfony support, at http://channelsun.sun.com/video/open-source/netbeans/41815465001/symfony+framework+support+in+netbeans+ide+6.8/45090595001.
Btw, does the Symfony framework give much support for RESTful web services? I’m working my way through a book now on RESTful PHP WS’es.
Jeff
10/11/2009 at 02:31 |
hi, yes looks like it does, see: http://fabien.potencier.org/talk/16/symfony-camp-2008-REST
04/02/2010 at 19:13 |
Hi,
Thanks for your tips. I still find code completion slow, even now on 6.8! Do you or anyone else have more tips? I also find that it does not pick up my class methods when typing $instance->
It’s a shame because although I like Netbeans, PHPEd has much better CC.