给变量起名的事情上,为你生命省 3s

2018-04-28 14:38:54 +08:00
 easternslope

cerebro-codelf

There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton

给变量起名的事情上,为你生命省 3s

Cerebro 变量名搜索插件,项目灵感来源 codelf。通过 Cerebro 的搜索窗口快速查找变量名。

特性

安装

使用

LICENSE

MIT

欢迎 fork :fork_and_knife: 和 star :star:

项目地址 https://github.com/carlos-wong/cerebro-codelf

10764 次点击
所在节点    分享发现
58 条回复
netlxl
2018-04-28 16:22:32 +08:00
重启了一次后好了,不过搜索有点慢,并且没有 Java 的小驼峰命名。
carloswong
2018-04-28 16:27:33 +08:00
@netlxl 这个插件的方式并不是自动生成命名,是通过有道翻译,接入 https://searchcode.com/ 进行搜索,并统计对应的变量或者函数名出现的次数进行排序。 所以总的来说并不是生成变量名,是帮你找一下大家针对这个名字都怎么起名字。目前是搜索所有语言,后续会增加根据语言进行过滤。
wangchonglie
2018-04-28 16:29:31 +08:00
@easternslope 可以了,不够等待的时间略微有点长,但确实还是很好的功能,感谢。
mjikop1231
2018-04-28 16:33:06 +08:00
x,xx,xxx,xxxx
y,yy,yyy,yyyy
t1,t2,t3,t4
妈耶~~
easternslope
2018-04-28 16:40:45 +08:00
哈哈,不客气,好用的话点个 Star @wangchonglie
easternslope
2018-04-28 16:44:08 +08:00
@mjikop1231 这种命名应该就地正法
wangchonglie
2018-04-28 16:51:58 +08:00
@easternslope 已点~
easternslope
2018-04-28 16:57:41 +08:00
@wangchonglie 开心,感兴趣的话欢迎来 PR
mseasons
2018-04-28 17:38:56 +08:00
输入你好世界,会有 world! 这种命名……
easternslope
2018-04-28 18:13:24 +08:00
@mseasons 这个是从代码库搜出来的,可能是注视
CloudnuY
2018-04-28 18:19:38 +08:00
话说 中文名都不好起……
easternslope
2018-04-28 18:24:07 +08:00
@CloudnuY 哈哈,你这么说,可以改进的空间跟大啊
GjriFeu
2018-04-28 19:00:20 +08:00
有点慢的说,等半天才想出了起什么名字
murmur
2018-04-28 19:02:12 +08:00
省 2 秒就够了 加个 feature 送虵 1 秒好么
ebony0319
2018-04-28 19:02:33 +08:00
刚需。
chroming
2018-04-28 19:02:40 +08:00
感谢分享,回去试试 cerebro
easternslope
2018-04-28 19:43:53 +08:00
@chroming 哈哈,试了就回不去了
easternslope
2018-04-28 19:44:21 +08:00
@GjriFeu 是有点,搜索引擎在外网,所以加载比较慢
easternslope
2018-04-28 20:10:02 +08:00
@murmur 你太暴力了
Suclogger
2018-04-28 20:33:27 +08:00
有 alfred 的 workflow 吗

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/450677

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX