Skip to content
| Marketplace
Sign in
Visual Studio Code>Themes>Second CommentNew to Visual Studio Code? Get it now.
Second Comment

Second Comment

Kasukabe Tsumugi

|
5 installs
| (0) | Free
When comments are folded, the second line will be displayed.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Second Comment

切换语言 中文 English

Second Comment 是一个 Visual Studio Code 扩展,当注释块被折叠时会在折叠行后显示该注释块的第二行内容,方便在不展开注释的情况下快速查看要点信息。

example gif

使用方法

  • 打开包含多行注释的文件。
  • 折叠注释块(例如 /** ... */ 或多行 ///# 注释)。扩展会在折叠行之后渲染第二行文本。

支持的注释类型

  • 主要支持 C/JavaScript 风格的块注释(如 /** ... */,包括 JSDoc 风格)。
  • 也支持连续的多行 // 注释和多行 # 注释块。

示例:

/**
 * 注释标题
 * 详细说明...
 */

设置

所有设置位于 second-comment 配置节下。

  • second-comment.textColor (string)

    • 描述:用于渲染注释文本的颜色,支持 hex 或 rgb 值。
    • 默认:rgb(220,120,50)
  • second-comment.textDecoration (string)

    • 描述:渲染文本的样式(CSS text-decoration 或 font-weight),例如 underline; font-weight:600。
    • 默认:font-weight:600
  • second-comment.margin (string)

    • 描述:应用到渲染后文本的外边距(CSS margin 简写),例如 0 0 0 0.5rem。
    • 默认:0 0 0 0.5rem

在 VS Code 设置中搜索 “Second Comment” 或 second-comment 可修改这些值。

贡献

如果发现 bug 或有功能请求,请打开 issue,欢迎提交 pull request。

作者

Kasukabe Tsumugi(欢迎访问 Tsumugi Cabin 查看更多有趣的包)

Second Comment English

切换语言 中文 English

Second Comment is a Visual Studio Code extension that displays the second line of a comment block when the block is folded. This helps you quickly see the key information in multi-line comments without expanding them.

Usage

  • Open a file that contains multi-line comments.
  • Fold a comment block (e.g. /** ... */). The extension will render the second line's text as an inline decoration after the folded line.

Supported Comment

Mainly supports block comments like /** ... */. Multiple lines of # comments are also supported.

/**
 * Some Comment
 * Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 */

Settings

All settings are under the second-comment configuration section.

  • second-comment.textColor (string)

    • Description: Text color used for the rendered comment text. Accepts hex or rgb values.
    • Default: rgb(220,120,50)
  • second-comment.textDecoration (string)

    • Description: Text decoration for the rendered comment (CSS text-decoration and font-weight values), e.g. underline; font-weight:600.
    • Default: font-weight:600
  • second-comment.margin (string)

    • Description: Margin applied to the rendered after-text (CSS margin shorthand), e.g. 0 0 0 0.5rem.
    • Default: 0 0 0 0.5rem

Search for "Second Comment" or second-comment in the VS Code Settings to change these values.

Contributing

Please open an issue if you find a bug or have a feature request. Pull requests are welcome.

Author

Kasukabe Tsumugi (Welcome to Tsumugi Cabin to see more interesting packages)

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