Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Octicons RefsrcNew to Visual Studio Code? Get it now.
Octicons Refsrc

Octicons Refsrc

Liangru Liu

|
101 installs
| (0) | Free
Provide icon reference source for other plugins
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Octicons Refsrc

VS Market Version VS Market Last Updated VS Market Installs (Static) Extension's Keywords

展开 中文版介绍

本插件可以为其他 VSCode 插件提供 Octicons 图标引用源。
这和图标主题不是一回事,具体功能见后文。

简介

  • 根据 VSCode 官网 介绍,插件可以在字符串中使用诸如 $(iconId) 的形式来引用图标,并且它的本质是 图标字体。
  • 软件原生提供的图标字体是 Codicon,而本插件又提供了一款 GitHub 出品的 Octicons。
  • 本插件的使用场景:
    1. 你是一位插件开发者,你的插件中需要大量使用 Octicons 的图标,则可以安装此插件,并要求你的用户也安装,然后你就能在你的插件里引用 Octicons 图标了。
    2. 你是一位插件开发者,如果你只想使用个别图标,或者想用的不是 Octicons,你可以自己做一个字体,但本插件的代码也可以作为工具。[注]
    3. 你是一位插件使用者,你使用的某些插件提供了设置项,可以让你填写图标名来自定义图标,但你发现 Codicon 不够用而 Octicons 能满足需求时,可以使用此插件。

安装与使用

  1. 点击 VSCode 左侧扩展按钮,在搜索框搜索,点击 [安装]。
  2. 点开简介中给出的 Octicons 网站,找到所需图标及其名称(假设为 iconId),然后就能以 $(octicons-iconId) 格式引用。
    (例如图标 alert-24 对应的引用就是 $(octicons-alert-24))

说明

  1. 插件代码所在位置为(Windows 上的默认路径):
    C:/Users/<NAME>/.vscode/extensions/liangruliu.octicons-refsrc-<VER>
  2. 插件里面的代码是在插件开发时用的,插件运行时不需要执行代码。
    那些代码用来将图标正确转换为字体并进行注册,这也正是我所说的“可作为其他开发者的工具”。

小图标,大用途!





英文版介绍

This plugin can provide Octicons icon reference source for other VSCode plugins.
This is not the same thing as an icon theme; its specific function is described below.

Introduction

  • According to VSCode official website, plugins can use the form such as $(iconId) to refer to icons in strings, which essence is iconfont.
  • The iconfont provided natively by the software is Codicon, and this plugin provides one named Octicons produced by GitHub.
  • Usage scenarios of this plugin:
    1. You are a plugin developer, and you need to use a lot of Octicons icons in your plugins, you can install this plugin and ask your users to install too, and then you can refer to the Octicons icon in your plugins.
    2. You are a plugin developer, if you just want to use individual icons, or don't want to use Octicons, you can make a font yourself, but the code of this plugin can also be used as a tool. [Note]
    3. You are a plugin user, and some plugins you use provide setting items that allow you to fill in the icon name to customize the icon, but you find that Codicon is not enough while Octicons can meet your needs, then you can use this plugin.

Installation & Usage

  1. Click the extension button on the left side of VSCode, search in the search box, and click [install].
  2. Go to the Octicons' website given in the introduction, find the icon you need and its name (let's say iconId), then you can refer to it in the format $(octicons-iconId).
    (For example, the reference to the icon alert-24 is $(octicons-alert-24))

Description

  1. The location of the plugin code is (Default path on Windows):
    C:/Users/<NAME>/.vscode/extensions/liangruliu.octicons-refsrc-<VER>
  2. The code in the plugin is used only when I develop the plugin, and it doesn't need to be executed when the plugin is running.
    That code is used to properly convert icons to a font and register them, which is what I mean by "useful as a tool for other developers".

Enjoy!



  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft