起因
在寫博客的過程中有的話總是會反復的說,就是這一句(逃
所以考慮有沒有直接能生成這段話的模板,防止每次發博客的時候都要去復制粘貼
配置
因為現在typro
需要收費了,所以我在電腦上寫博客現在都是用VScode
+markdown
插件,這里配置廢話模板當然也是在VScode上進行配置
打開VScode的settings.json
,添加
"[markdown]": {
"editor.quickSuggestions": true
}
保存之后打開 文件->首選項 -> 用戶片段
輸入並選擇markdown
這里已經給了我們一個example,在body里面編寫我們的模板
比如這里我編寫的就是
{
// Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "end",
"body": [
"## END ",
" ",
"建了一個微信的安全交流群,歡迎添加我微信備注`進群`,一起來聊天吹水哇,以及一個會發布安全相關內容的公眾號,歡迎關注 :)",
" ",
"<div>",
" <img alt=\"GIF\" src=\"https://springbird.oss-cn-beijing.aliyuncs.com/img/mmqrcode1632325540724.png\" width=\"280px\" />",
" <img alt=\"GIF\" src=\"https://springbird.oss-cn-beijing.aliyuncs.com/img/qrcode_for_gh_cead8e1080d6_344.jpg\" width=\"280px\" />",
"</div>"
],
"description": "end output"
}
}
保存即可
效果
創建一個新的markdown文件,輸入 上面prefix
對應的內容,這里我對應的就是end
可以看到我輸入end
之后VScode出現了提示,回車或者tab
即可
模板內容成功生成
參考鏈接
END
建了一個微信的安全交流群,歡迎添加我微信備注進群
,一起來聊天吹水哇,以及一個會發布安全相關內容的公眾號,歡迎關注 😃

