easternslope

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

  •  
  •   easternslope · Apr 28, 2018 · 12021 views
    This topic created in 3113 days ago, the information mentioned may be changed or developed.

    cerebro-codelf

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

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

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

    特性

    • 快速启动、搜索
    • 中英文搜索
    • 自由定制

    安装

    • 插件依赖于 Cerebro
    • Ctrl-Space 打开 Cerebro
    • 输入 plugins codelf,点击安装

    使用

    • Cerebro 中,输入 codelf + [待搜索的变量名];
    • 上下选择变量名,敲回车 Enter 复制到剪切板;

    LICENSE

    MIT

    欢迎 fork :fork_and_knife: 和 star :star:

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

    58 replies  •  2018-04-30 22:30:48 +08:00
    robinchina
    robinchina
    Apr 28, 2018
    1
    emmmm,不错
    geew
    geew
    Apr 28, 2018
    2
    好东西 只有 mac 版么
    easternslope
    easternslope
    OP
    Apr 28, 2018
    3
    geew
    geew
    Apr 28, 2018
    4
    @easternslope #3 哇 没注意到 我试试 谢谢
    easternslope
    easternslope
    OP
    Apr 28, 2018
    5
    @geew 就喜欢给别人安利东西,哈哈
    Cerebro 免费开源很强大,而且可以自己写插件
    odirus
    odirus
    Apr 28, 2018
    6
    嗯嗯,稀饭
    odirus
    odirus
    Apr 28, 2018
    7
    @easternslope #5 不够 win 下如何走代理,Google 访问不了,如果走全局的话不合适
    geew
    geew
    Apr 28, 2018
    8
    @easternslope #5
    装上了没法用?
    easternslope
    easternslope
    OP
    Apr 28, 2018
    9
    @odirus 不会吧? Github 被墙了?
    easternslope
    easternslope
    OP
    Apr 28, 2018
    10
    @geew codelf 后面空格,然后输入 “你好世界” ,稍等一下,网络会比较慢
    geew
    geew
    Apr 28, 2018
    11
    @easternslope #10 等了好久 都没有东西出来 我还把代理开了全局都不行哦
    easternslope
    easternslope
    OP
    Apr 28, 2018
    12
    JustinL
    JustinL
    Apr 28, 2018 via Android
    13
    和 wox 好像,不知道有何不同…
    easternslope
    easternslope
    OP
    Apr 28, 2018
    14
    @JustinL Wox 不是跨平台的,我看好像只能在 Windows 下面用
    wangchonglie
    wangchonglie
    Apr 28, 2018
    15
    安装 Cerebro 的过程中就失败了。。
    easternslope
    easternslope
    OP
    Apr 28, 2018
    16
    @wangchonglie 下载 release 直接安装
    wangchonglie
    wangchonglie
    Apr 28, 2018
    17
    @easternslope 通过官网成功安装了,然后遇到和 @geew 朋友一样的问题。
    easternslope
    easternslope
    OP
    Apr 28, 2018
    18
    别慌 @wangchonglie @geew 容我看看 Windows 上面的问题
    netlxl
    netlxl
    Apr 28, 2018
    19
    你们上面那个还能出来“ Search Web for codelf ”,我的输入后啥都没有
    easternslope
    easternslope
    OP
    Apr 28, 2018❤️1
    20
    @wangchonglie @geew 搞定了,重新安装一下插件就好了
    netlxl
    netlxl
    Apr 28, 2018
    21
    重启了一次后好了,不过搜索有点慢,并且没有 Java 的小驼峰命名。
    carloswong
    carloswong
    Apr 28, 2018
    22
    @netlxl 这个插件的方式并不是自动生成命名,是通过有道翻译,接入 https://searchcode.com/ 进行搜索,并统计对应的变量或者函数名出现的次数进行排序。 所以总的来说并不是生成变量名,是帮你找一下大家针对这个名字都怎么起名字。目前是搜索所有语言,后续会增加根据语言进行过滤。
    wangchonglie
    wangchonglie
    Apr 28, 2018
    23
    @easternslope 可以了,不够等待的时间略微有点长,但确实还是很好的功能,感谢。
    mjikop1231
    mjikop1231
    Apr 28, 2018 via iPhone
    24
    x,xx,xxx,xxxx
    y,yy,yyy,yyyy
    t1,t2,t3,t4
    妈耶~~
    easternslope
    easternslope
    OP
    Apr 28, 2018
    25
    哈哈,不客气,好用的话点个 Star @wangchonglie
    easternslope
    easternslope
    OP
    Apr 28, 2018
    26
    @mjikop1231 这种命名应该就地正法
    wangchonglie
    wangchonglie
    Apr 28, 2018
    27
    @easternslope 已点~
    easternslope
    easternslope
    OP
    Apr 28, 2018
    28
    @wangchonglie 开心,感兴趣的话欢迎来 PR
    mseasons
    mseasons
    Apr 28, 2018
    29
    输入你好世界,会有 world! 这种命名……
    easternslope
    easternslope
    OP
    Apr 28, 2018 via Android
    30
    @mseasons 这个是从代码库搜出来的,可能是注视
    CloudnuY
    CloudnuY
    Apr 28, 2018
    31
    话说 中文名都不好起……
    easternslope
    easternslope
    OP
    Apr 28, 2018
    32
    @CloudnuY 哈哈,你这么说,可以改进的空间跟大啊
    GjriFeu
    GjriFeu
    Apr 28, 2018
    33
    有点慢的说,等半天才想出了起什么名字
    murmur
    murmur
    Apr 28, 2018
    34
    省 2 秒就够了 加个 feature 送虵 1 秒好么
    ebony0319
    ebony0319
    Apr 28, 2018 via Android
    35
    刚需。
    chroming
    chroming
    Apr 28, 2018 via Android
    36
    感谢分享,回去试试 cerebro
    easternslope
    easternslope
    OP
    Apr 28, 2018
    37
    @chroming 哈哈,试了就回不去了
    easternslope
    easternslope
    OP
    Apr 28, 2018
    38
    @GjriFeu 是有点,搜索引擎在外网,所以加载比较慢
    easternslope
    easternslope
    OP
    Apr 28, 2018
    39
    @murmur 你太暴力了
    Suclogger
    Suclogger
    Apr 28, 2018
    40
    有 alfred 的 workflow 吗
    easternslope
    easternslope
    OP
    Apr 28, 2018
    41
    @Suclogger 哈哈,没有,你要不试试 Cerebro,自己写插件,想啥干啥
    sunnygaofan
    sunnygaofan
    Apr 29, 2018 via iPhone
    42
    其实挺实用
    easternslope
    easternslope
    OP
    Apr 29, 2018
    43
    @sunnygaofan 看到 x1, temp, a, b 这些玩意就想打人
    fhefh
    fhefh
    Apr 29, 2018
    44
    @easternslope 楼主能不能提供一个 Alfred 的 workflow 版本~~ 嘿嘿~~~
    easternslope
    easternslope
    OP
    Apr 29, 2018
    45
    @fhefh 哈哈哈,作者更喜欢开源软件,可以随便改
    eurokingbai2
    eurokingbai2
    Apr 29, 2018
    46
    省了 3 秒,给谁续?
    easternslope
    easternslope
    OP
    Apr 29, 2018
    47
    @eurokingbai2 终于有人关注到重点了
    standin000
    standin000
    Apr 29, 2018
    48
    @easternslope 请问 cerebro 是跟 everything,listary 或者 Alfred2 类似的软件吗,感觉网上介绍很少
    easternslope
    easternslope
    OP
    Apr 29, 2018
    49
    @standin000 是的,是一个比较小众的对话式启动软件,优点是写插件很方便,开源免费。如果你用 JavaScript 的话可以考虑试试,个人觉得很好用,可以将平时的机械性重复工作用插件完成,极大地提高工作效率。
    carloswong
    carloswong
    Apr 29, 2018❤️1
    50
    @standin000 这类对话式的操作软件还是有不少项目的,但是跨平台,插件开发简单来说。我认为 cerebro 是比较出色的。一个能让自己任意修改的软件才是好软件是吧? :)
    yuhuan66666
    yuhuan66666
    Apr 29, 2018 via Android
    51
    记得 IDEA 里有个翻译插件自动把中文翻译成英文的变量命名功能
    Messiv2
    Messiv2
    Apr 29, 2018
    52
    @murmur
    @easternslope
    @eurokingbai2
    @easternslope
    五一还没到,你们这么着急吗
    easternslope
    easternslope
    OP
    Apr 29, 2018 via Android
    53
    @Messiv2 啥情况🤔
    seiuneko
    seiuneko
    Apr 29, 2018
    54
    @easternslope #53 枪毙名单了解一下
    standin000
    standin000
    Apr 29, 2018
    55
    @easternslope 你的意思是 cerebro 插件只能用 javascript 写? cerebro 是对程序员有用,还是个效率工具
    carloswong
    carloswong
    Apr 30, 2018
    56
    @standin000 我认为这是一个通用的效率工具,不同于菜单,UI 交互的工作方式。更接自然对话的交互方式。这是一个输入窗口,只要有足够多的插件,就可以说出你想要做的任何事,问出你想要问的任何问题。
    carloswong
    carloswong
    Apr 30, 2018
    57
    版本已经更新,增加了正在搜索的提示。欢迎大家多多使用,多多提 issue
    easternslope
    easternslope
    OP
    Apr 30, 2018
    58
    看来给变量取名真的是个痛点
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3659 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 00:23 · PVG 08:23 · LAX 16:23 · JFK 19:23
    ♥ Do have faith in what you're doing.