Hi all,
If you think you may have some kind of reusable sitemap template/content/stuff/whatever
that is needed regularly, we (or to be a bit more clear -> you) could add it as a snippet
into the vscode extension.
Snippets are no rocket science and more or less easy to build.
The benefit of an integration is, that everyone who installs the extension may profit from your thoughts and work that you invested in it.
And as a second benefit you don’t need to remember your paste-able contents or where you have saved them.
OK sounds interesting and what would need to be done for adding one?
It is done by proposing a pull request to our extension github repository.
The snippet itself is just some information stored in json
.
Here is a sitemap example that is currently live in the extension:
{
"sitemap": {
"prefix": "sitemap",
"body": [
"sitemap ${1:sitemap_name} label=\"${2:Sitemap Label}\" {",
"\tFrame label=\"${3:First frame}\" icon=\"${4:icon}\" {",
"\t\tText item=${5:Item}",
"\t}",
"\tFrame label=\"${6:Second frame}\" {",
"\t\tGroup item=${7:OtherItem}",
"\t}",
"}"
],
"description": "Create a openHAB sitemap"
}
}
This generates an example sitemap container with two Frames and some Dummy Text/Group elements.
Looks like this:
As you can see in the picture, there are some highlighted words, which can be edited in a row with the TAB
key.
You can even specify the order of editing.
So if one of you has some snippets that are worth a share, we could add them to one of the next extension releases.
Just poke me, if you need some git/github help.
Just as a side node:
A sign-off statement will be mandatory, when adding something to the extension.
I am handling these very loose for the docs repo, but that’s not possible for the extension repo.
But in my opinion this shouldn’t be a show stopper.