有没有人有记事本的解析规则++ Ruby 和 Rake 的函数列表插件
我使用 Notepad++ 编辑 rake 文件,并且希望能够使用函数列表插件。
我无法在线找到任何解析规则,并且“语言解析规则”对话框没有非常清晰的记录。
我正在将方法解析到以下列表中,但还想显示任务。
Function Begin: [ \t]*def[ \t]+
Function List Name: [a-zA-Z0-9_\.]*
这不是很干净,并且不会捕获以 ? 结尾的函数。或!,但这是一个开始。
我的任务规则不起作用是:
Function Begin: [ \t]*task[ \t]+
Function List Name: :[a-zA-Z0-9_\.]*
Function End: [ \t]+do
欢迎任何建议。
谢谢
I'me using Notepad++ for editing rake files and I'd like to be able to use the function list plugin.
I've been unable to find any parsing rules on line, and the "Language Parsing Rules" dialog is not very clearly documented.
I'm parsing methods into the list with the following, but would like to also display tasks.
Function Begin: [ \t]*def[ \t]+
Function List Name: [a-zA-Z0-9_\.]*
This isn't very clean, and won't capture functions that end with ? or !, but it is a start.
My task rule, which isn't working is:
Function Begin: [ \t]*task[ \t]+
Function List Name: :[a-zA-Z0-9_\.]*
Function End: [ \t]+do
Any suggestions most welcome.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这是我的规则。还不够完美。不知道如何配置子组。
Here is my rules. Still not perfect yet. Don't know how to config subgroups.
也许您可以使用以下设置,将其添加到
FunctionListRules.xml
文件中:Maybe you can use the below settings which you can add in your
FunctionListRules.xml
file:从 6.4 版本开始,不再需要插件了!查看新的功能列表功能:
http://notepad-plus-plus.org/features/function-list.html
语言支持即将推出,也许在这里询问会有所帮助:
https://sourceforge.net/p/notepad-plus/discussion/ 331753/线程/b9d2fe00/
Since version 6.4 there is no need for a plugin! Check out the new function list feature:
http://notepad-plus-plus.org/features/function-list.html
Language support is coming, perhaps asking here would help:
https://sourceforge.net/p/notepad-plus/discussion/331753/thread/b9d2fe00/
我正在为新的 functionList.xml 使用以下解析器。它可以识别大多数类模块和方法定义,除非多个定义位于同一行。例如,
在上面的情况下,它只会识别“模块 A”,
所有内容都只是作为函数呈现,包括“class”、“module”或“def”关键字。它不使用 classrange 提供的层次结构。
I'm using the following parser for the new functionList.xml. It recognizes most of classes modules and method definitions exept if multiple definitions are on the same line. E.g.
In the above case it will just recognize "module A"
Everything is just presented as function including "class" "module" or "def" keyword. It is does not use the hierarchy provided by classrange.