Reputation: 18798
How to get code completion to work for PHP in Netbeans 6.9.1? I want Netbeans to suggest native PHP functions.
The auto complete 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.
Upvotes: 0
Views: 2294
Reputation: 2077
Apparently deleting the contents of .netbeans/var/cache/index in your user directory (application data on windows etc) fixed it.
Upvotes: 0
Reputation: 22926
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)
Upvotes: 1
Reputation: 825
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
Upvotes: 2
Reputation: 12850
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...
Upvotes: 3