Vim 函数可在预览窗口等位置显示标签的文档(例如 phpdoc)

发布于 2024-12-02 00:04:08 字数 186 浏览 3 评论 0原文

我无法找到一个插件或脚本来显示给定标签的函数文档。

假设我将光标放在函数 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

红玫瑰 2024-12-09 00:04:08

我不确定它是否提供了您正在寻找的功能,但是有一组非常详尽的 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.

山田美奈子 2024-12-09 00:04:08

我更改了 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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文