vscode和HBuilderx设置快捷键注释

一、vscode设置快捷键注释

1.打开vscode,使用快捷键:ctrl+shift+p  mac的话快捷键是:command+shift+p

然后在行中输入snippets

vscode和HBuilderx设置快捷键注释_第1张图片vscode和HBuilderx设置快捷键注释_第2张图片

 2.选择“新建”,选择将要配置的文件类型(以vue类型为例)我这里创建的名字为vue.json

vscode和HBuilderx设置快捷键注释_第3张图片

然后修改内容为

{
	"Print to console": {
        "prefix": "zxlComments",
        "body": [
            "/* ",
            " * @description: ",
            " * @Copyright by: xxxxxc有限公司",
            " * @author: 作者 ",
            " * @date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
            "*/"

        ],
        "description": "在vue文件开头配置注释"
    }
}

二、设置Vue3快捷键模版

1.打开vscode,使用快捷键:ctrl+shift+p  mac的话快捷键是:command+shift+p

然后在行中输入snippets

vscode和HBuilderx设置快捷键注释_第4张图片

{
    "Print to console": {
        "prefix": "v3", //自定义触发指令,我这里设置输入v3按下回车即可快速生成模板
        "body": [ //定义模板内容
			"",
			"",   
		    "",
            "",
          
            ""
        ],
        "description": "Log output to console"
    }
}

vscode和HBuilderx设置快捷键注释_第5张图片

 三、uni-app快捷注释

找到工具/代码块设置/javascript代码块 

vscode和HBuilderx设置快捷键注释_第6张图片

修改文件:
 

{
    "method-annotation": {
	 "prefix": "zxl",
			"body": [
				"/**",
				"  * @Description:",
				"  * @author: ZXL",
				"  * @param $1",
				"  * @return $2",
				"  * @createTime: $DATE_TIME", 
				"  * @Copyright by XXXXX科技有限公司",
				"  */"
			],
			"triggerAssist": false,
			"description": "file annotation"
	 }
}

 vscode和HBuilderx设置快捷键注释_第7张图片

你可能感兴趣的:(vscode,ide,编辑器)