GFM Alerts記法のスニペットを設定する

/

GitHub で > [!NOTE] といったアラート記法を使えるようになったので、VSCode でスニペットを設定しました。

アラートについて

Note

Useful information that users should know, even when skimming content.

Tip

Helpful advice for doing things better or more easily.

Important

Key information users need to know to achieve their goal.

Warning

Urgent info that needs immediate user attention to avoid problems.

Caution

Advises about risks or negative outcomes of certain actions.

undefined
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

スニペット

/snippets/markdown.json
{
"GFM Alerts NOTE": {
"prefix": [
"alerts",
"note"
],
"body": [
"> [!NOTE]",
"> $0"
],
"description": "Useful information that users should know, even when skimming content."
},
"GFM Alerts Tip": {
"prefix": [
"alerts",
"tip"
],
"body": [
"> [!TIP]",
"> $0"
],
"description": "Helpful advice for doing things better or more easily."
},
"GFM Alerts IMPORTANT": {
"prefix": [
"alerts",
"important"
],
"body": [
"> [!IMPORTANT]",
"> $0"
],
"description": "Key information users need to know to achieve their goal."
},
"GFM Alerts WARNING": {
"prefix": [
"alerts",
"warning"
],
"body": [
"> [!WARNING]",
"> $0"
],
"description": "Urgent info that needs immediate user attention to avoid problems."
},
"GFM Alerts CAUTION": {
"prefix": [
"alerts",
"caution"
],
"body": [
"> [!CAUTION]",
"> $0"
],
"description": "Advises about risks or negative outcomes of certain actions."
}
}

remark plugin

markdown を処理する際の remark plugin として、hyoban/remark-github-alerts を利用した。