Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How vscode generates templates

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to generate the template of vscode, which is very detailed and has certain reference value. Friends who are interested must finish reading it!

How does vscode generate templates? Setting up html5 Quick Generation template in vs code

Recommended for related articles and tutorials: vscode tutorial

Press English! Html templates can be generated quickly by both HGR 5 and HRL 5, but I can't find out how to modify the template settings after searching for a long time. I had to rewrite a template for html5 from snippets so that I wouldn't forget it later.

Open snippets first

Then enter the following code snippet:

{/ / Place your snippets for html 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": "log", / / "body": [/ / "console.log ('$1') ", / /" $2 "/ /], / /" description ":" Log output to console "/ /}" Html5-Vue ": {" prefix ":" vh "," body ": [", "\ n", "", "\ t", "\ t" "\ t", "\ tDocument", "\ t", "\ n", "", "\ t\ 1\ n", "\ t", "\ t\ tvar vm = new Vue ({", "\ t\ t\ tel:'# app'," "\ t\ t\ tdata: {},", "\ t\ t\ tmethods: {}", "\ t\ t}) ","\ t ","\ n ","]," description ":" quickly create vue templates written in html5 "}}

Here "prefix": "vh", refers to your custom shortcut code, here I type h will appear quickly generate code prompt, you can also customize other fields.

The effect is as follows:

The above is all the content of the article "how to generate templates for vscode". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report