步骤
- 修改设置文件
settings.json
{
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": true # 使代码片段功能生效
}
}
- 添加代码片段,即编辑
markdown.json
{
"note template": {
"prefix": "header",
"body": [
"---",
"title: $TM_FILENAME_BASE",
"date: $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"updated: $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"categories: ${1:categories}",
"tags: ${2:tags}",
"---",
"$0"
],
"description": "header template"
},
"red font": {
"prefix": "red",
"body": [
"<font color='red'>$1</font>$0"
],
"description": "红色字体"
}
}