Vim: Show function hints or signature for PHP

二次信任 提交于 2019-12-09 13:19:12

问题


I've got my nice PHP syntax highlighting all set up and it looks great. What I need now is the ability to show built-in function signatures or hints while typing.

This is so common in so many IDEs, I would think somebody has a plugin to do this for VIM.

Example: While in insert mode, and typing str_replace, somewhere on the vim screen would say "mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )"

Does anyone know of a good plugin for this? If not for PHP, then maybe something that can be ported to php using the right function definitions file.

Thanks!


回答1:


You can use the TagList plugin. One of it's features is showing function signatures in the status bar. See also this tutorial. TagList uses exuberant-ctags to parse your PHP files. Have a look at this article I wrote to see how you can tweak/patch exuberant-ctags to make it work a little better with PHP5.



来源:https://stackoverflow.com/questions/3191016/vim-show-function-hints-or-signature-for-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!