How to get code completion to work for PHP in Netbeans 6.9.1? I want Netbeans to suggest native PHP functions.
EDIT:
The auto compl开发者_Python百科ete only works for reserved vars and reserved keywords but not for native functions. Looking at the example above, it should suggest e.g str_replace, strlen, etc...that doesnt happen even after CTRL + SPC.
Just make sure you have enabled the PHP plugin, that should do the trick. BTW autocomplete might not work while NetBeans is checking for project changes though...
This happened to me from time to time when I used NetBeans. I used the CTRL+SPACE shortcut to invoke the code completion window.
UPDATE:
If you're interested, you can also use VIM, which has a code completion feature for php as well.
Assuming you have VIM 7 (Full version) installed, add the following to your .vimrc file:
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
To use the code completion window, simply use CTRL+X CTRL+O
Install NetBeans with PHP support. OR if you already have netbeans, you need to install PHP plugin by going to Plugins Manager.
If you want code completion for external libraries like Zend, add them in the Gobal Include Path (available in project properties)
Apparently deleting the contents of .netbeans/var/cache/index in your user directory (application data on windows etc) fixed it.
精彩评论