Despite what some might say, I believe that code completion (aka Intellisense) is the second best invention when it comes to code editors (the first being syntax coloring). It really makes coding easier because I don't have to worry whether I named the function CalculateReportSums
, ReportSumsCalculate
or simply GetReportSums
.
Unfortunately I have not yet found a code editor which would satisfactory implement this feature for PHP. And by "satisfactory" I mean "as good as Visual Studio for C#".
My first choice of text editor is Notepad++, but that only has a list of PHP's built-in functions, and it only appears after you hit Ctrl+SPACE. I've also tried Eclipse+PDT, which is better, but still often has hiccups, sometimes fails altogether for no apparent reason (no list available), and always appears only when I pause typing (setting the timeout to some small value causes the list not to appear altogether).
So - is there something better out there? Something that would be aware of all the variables in the current scope, that would be able to follow include()
s, and would display the list in real-time as I type?
I know that PHP is a dynamic language and a perfect code-completion is impossible in principle (because you don't know what variables will be there until runtime), but it should still be possible to implement it to a fairly good degree - much better than what I've seen so far.
Added: To add a few minor points - I want the CC to be instantaneous, like in Visual Studio. I type a character, and the list shows at the same instant. I type another character and the list becomes half the size before I can even blink. Near-zero CPU usage, instantaneous results (all hail the Gods of caching!).
Also - I'm fine with documenting my functions and even variables in a special way. I prefer PHPLint syntax (because then I can check my code with it later), but other syntaxes will do as well. Forcing to do this is also good for your commenting discipline. :)