Vim 函数可在预览窗口等位置显示标签的文档(例如 phpdoc)
我无法找到一个插件或脚本来显示给定标签的函数文档。
假设我将光标放在函数 foo
上。 foo
的源代码位于另一个当前未打开的文件中,但已被扫描到项目的标记文件中。我希望能够调用一个函数来显示该函数的文档,该文档将位于 phpdoc 格式的函数声明之上。
存在这样的东西吗?
I haven't been able to find a plugin or script that to display the documentation for the function for a given tag.
Say I have the cursor over a function foo
. The source code for foo
is in another file that's not currently open, but has been scanned into the project's tags file. I would like to be able to call a function that would display the documentation for that function, which would be above the function declaration in phpdoc format.
Does something like that exist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定它是否提供了您正在寻找的功能,但是有一组非常详尽的 PHP 插件,名为 VIP< /a>.
I'm not sure it provides the feature you are looking for but there is a very exhaustive set of plugins for PHP called VIP.
我更改了 phpcomplete.vim 插件,以便它解析 phpdoc。这意味着当您处于自动完成状态时,关联的 phpdoc 将在顶部屏幕上显示函数名称和参数。这并不完全是您想要的,因为您需要输入一些内容来获取信息,而不仅仅是用光标浏览方法名称,但您可能会发现它无论如何都有帮助。
不幸的是,它目前仅适用于方法。您还需要 vim-python 和 exuberant 标签(用于生成类标签)
I have changed the phpcomplete.vim plugin so it parses the phpdoc. This means while your in autocomplete, the associated phpdoc will be shown with the function name and args on the top screen. This is not exactly what you would want since you need to type something to get the info and not just going over the methods name with cursor but you may find it helpful anyways.
Unfortunately, its only for methods for now. You will also need vim-python and exuberant tags (to generate class tags)