Skip to content

【教程】5分钟给你喜爱的编辑器开发 CODELF 插件 #66

@unbug

Description

@unbug

写在前面

作者的精力有限,仅给 CODELF 开发了 Atom, VS Code, Sublime 的插件。你可以在 WiKi 找到其他编辑器如何添加 CODEL 一键搜索的方法。
如果,你有兴趣给自己喜爱的编辑器开发 CODELF 插件,请往下看。

开发思路

CODELF 和 Google,Baidu 类似,可以通过拼装 URL 直接搜索,如 https://unbug.github.io/codelf/#AI

即,https://unbug.github.io/codelf/#搜索内容

案例说明

CODELF 的 Atom, VS Code, Sublime 的插件都是这么实现的,将选中的内容拼装成https://unbug.github.io/codelf/#搜索内容打开浏览器即可实现搜索。

有些编辑器有搜索引擎插件,可以直接添加 CODELF 实现一键搜索,如 WebStorm 的 OnlineSearch.

有的编辑器的插件可以直接打开 WebView, 你只需要将 WebView 的地址设置成https://unbug.github.io/codelf/#搜索内容即可。如 CODELF 的 Atom 插件

是不是超级简单?

必读

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions