代码注释高亮、提供代码注释颜色自定义功能,让你轻松阅读代码注释,提高阅读效率,还能增加写代码注释的动力和乐趣。

正文开始,今天介绍的是一款 VS Code 代码注释插件—— Better Comments

Better Comments 简介:Better Comments 是一款能够高亮代码注释的插件,并且还提供自定义代码注释样式的功能,先放一张效果图:

前 5 行为插件自带样式,第 7 行为我自定义的样式

再简单讲讲自定义样式的方法和步骤:

1、下载插件,下载完成后进入到 VS Code 插件面板:

操作步骤

2、进入插件配置页面:

操作步骤

3、修改插件配置代码,以下为我的自定义代码:

    "better-comments.tags": [
        {
            "tag": "!",
            "color": "#FF2D00",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "?",
            "color": "#3498DB",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "//",
            "color": "#474747",
            "strikethrough": true,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "todo",
            "color": "#FF8C00",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "*",
            "color": "#98C379",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "@",
            "color": "#66d9ef",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        }
    ]

遇到问题可以评论留言,留下邮箱说不定就能收到回复喔。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注