PHP has some pretty inconsistent parameters for functions (e.g. sometimes first haystack, then needle, and sometimes the other way around). I’d like vim to somehow hint at what parameters are expected. I mostly care for integrated PHP functions, not for project-specific functions. Is this possible to set up / configure?
My idea is that I type:
strpos(
and vim tells notifies me it expects $haystack, $needle.
What version of Vim do you use?
Without any additional plugin or configuration, hitting
<C-x><C-o>after typing a couple of letters of a builtin function you are supposed to get the omnicompletion menu and a small preview window showing the signature of the currently selected function. See:help compl-omniand:help ft-php-omniWith
strpos(, you should get:You might want to try this slightly better omnicompletion script for PHP.