• VScode配置markdown自定义代码模板


    起因

    在写博客的过程中有的话总是会反复的说,就是这一句(逃

    所以考虑有没有直接能生成这段话的模板,防止每次发博客的时候都要去复制粘贴

    配置

    因为现在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

    建了一个微信的安全交流群,欢迎添加我微信备注进群,一起来聊天吹水哇,以及一个会发布安全相关内容的公众号,欢迎关注

    GIF GIF
  • 相关阅读:
    【BZOJ4621】Tc605 DP
    【BZOJ4624】农场种植 FFT
    【BZOJ4627】[BeiJing2016]回转寿司 SBT
    【BZOJ4631】踩气球 链表+线段树+堆
    Excel error 64-bit version of SSIS
    (转) bicabo Visual Studio 2012自动添加注释(如版权信息等)
    Integration Services 变量
    (转)SSIS_数据流转换(Union All&合并联接&合并)
    (转)SSIS处理导入数据时, 存在的更新, 不存在的插入
    (转)WPF学习资源整理
  • 原文地址:https://www.cnblogs.com/Cl0ud/p/15805571.html
Copyright © 2020-2023  润新知