Skip to content

Commit

Permalink
File snippets for HTML and PHP (microsoft#161881)
Browse files Browse the repository at this point in the history
* Adding file snippets for HTML and PHP to start small.

* Adding TS
  • Loading branch information
digitarald authored Sep 27, 2022
1 parent 70a7ce4 commit ea5b244
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
"meta.tag string.quoted": "other"
}
}
],
"snippets": [
{
"language": "html",
"path": "./snippets/html.code-snippets"
}
]
},
"repository": {
Expand Down
18 changes: 18 additions & 0 deletions extensions/html/snippets/html.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"html doc": {
"isFileTemplate": true,
"body": [
"<!DOCTYPE html>",
"<html>",
"<head>",
"\t<meta charset=\"UTF-8\" />",
"\t<title>${1:title}</title>",
"</head>",
"<body>",
"\t$0",
"</body>",
"</html>"
],
"description": "HTML Document"
}
}
2 changes: 2 additions & 0 deletions extensions/php/snippets/php.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"PHPDoc class …": {
"prefix": "doc_class",
"isFileTemplate": true,
"body": [
"/**",
" * ${6:undocumented class}",
Expand Down Expand Up @@ -42,6 +43,7 @@
},
"PHPDoc function …": {
"prefix": "doc_f",
"isFileTemplate": true,
"body": [
"/**",
" * ${1:undocumented function summary}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"Class Definition": {
"prefix": "class",
"isFileTemplate": true,
"body": [
"class ${1:name} {",
"\tconstructor(${2:parameters}) {",
Expand Down

0 comments on commit ea5b244

Please sign in to comment.