让 echofunc.vim 工作
我今天遇到了 echofunc.vim (来自 SO 中的链接)。由于我不擅长记住函数参数的顺序,因此它对我来说似乎是一个非常有用的工具。
但文档对安装有点精简!而且我在互联网上找不到任何补充资源。
我正在尝试让它在 RHEL 机器上运行。我已将脚本复制到 ~/.vim/plugin/echofunc.vim 中,但是当我输入函数名称后跟 '(' 时没有提示。我尝试添加
let g:EchoFuncLangsUsed = ["php","java","cpp"]
到我的 .vimrc - 仍然没有提示。
我 需要从某个地方的字典中读取 - 尽管 /usr/share/vim/vim70/ftplugin/php.vim 中有一个文件,但这是 RH 默认值,并且不包含显式函数列表。
猜测它 不太关心获取我定义的函数/方法的提示 - 只是试图获取内置函数的提示,我可以看到有一个字典文件 可在此处 似乎提供了 echofunc.vim 所需的资源,我看不到如何设置它。TIA
,
I came across echofunc.vim today (from a link in SO). Since I'm rubbish at remembering the order of function parameters, it looked like a very useful tool for me.
But the documentation is a bit lean on installation! And I've not been able to find any supplementary resources on the internet.
I'm trying to get it running on a RHEL box. I've copied the script into ~/.vim/plugin/echofunc.vim however no prompt when I type in a function name followed by '('. I've tried adding
let g:EchoFuncLangsUsed = ["php","java","cpp"]
to my .vimrc - still no prompting.
I'm guessing it needs to read from a dictionary somewhere - although there is a file in /usr/share/vim/vim70/ftplugin/php.vim, this is the RH default and does not include an explicit function list.
I'm not too bothered about getting hints on the functions/methods I've defined - just trying to get hints for the built-in functions. I can see there is a dictionary file available here which appears to provide the resources required for echofunc.vim, I can't see how I set this up.
TIA,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它需要一个
tags
文件,描述的最后一行准确描述了如何生成它:它在这里适用于 PHP,但不适用于 JS。您的里程可能会有所不同。
我不知道这个插件,谢谢你的信息。
你应该尝试phpcomplete.vim,它显示了当前函数的原型在便签本中。不过,它只是 PHP。
It expects a
tags
file, the last line of the description describes exactly how to generate it:It works here with PHP but not with JS. Your mileage may vary.
I didn't know about this plugin, thanks for the info.
You should try phpcomplete.vim, it shows a prototype of the current function in a scratchpad. It is PHP only, though.