YamlDotNet.Editor icon indicating copy to clipboard operation
YamlDotNet.Editor copied to clipboard

Should it register the 'New YAML file' template?

Open dsaf opened this issue 10 years ago • 9 comments

At the moment I can create e.g. a new XML File via the Visual Studio 2012 menu, but YAML doesn't seem to be available. Not sure if it's not implemented or not working.

FILE -> New File -> YAML File

I guess it's not the biggest deal, but just wanted to make you aware.

PS: thanks for supporting every modern version of Visual Studio.

dsaf avatar May 16 '15 21:05 dsaf

I think that it would make sense to offer this feature. I don't know how to implement that, though.

aaubry avatar May 17 '15 13:05 aaubry

This is an old one, so not sure if you'd still like to do it.

I could have a look at it if you like.

(Not familiar with that sort of thing, but happy to take on the challenge ;))

TheBeardedLlama avatar May 10 '16 13:05 TheBeardedLlama

I think that this would be a useful feature. You are welcome to look into this. The documentation of the Visual Studio extensibility is really poor. What helps is to find another open source project that does what you want and look how they do it :)

aaubry avatar May 10 '16 15:05 aaubry

no worries, I am aware of the documentation issues ;)

I'll have a go and keep you up to date

TheBeardedLlama avatar May 10 '16 15:05 TheBeardedLlama

I'm assuming the workflow is the standard fork and PR?

TheBeardedLlama avatar May 10 '16 15:05 TheBeardedLlama

also, what would you like the template to be?

or should I come up with some basic 1,2,3,4,5 type thing?

alternatively or in addition we could add this to side waffle (would that be ok @madskristensen?)

TheBeardedLlama avatar May 10 '16 15:05 TheBeardedLlama

Item templates are super easy with the TemplateBuilder nuget package. I'm using it in multiple extensions including the Webpack Task Runner

madskristensen avatar May 10 '16 15:05 madskristensen

The workflow is the standard one, with pull requests. I think that it would be useful to add the template to this extension. As a user I would expect the template to be part of the extension. Regarding the initial content of the file, I don't know what is best. If the user does not know YAML very well, it is nice to have an example document, such as https://en.wikipedia.org/wiki/YAML#Sample_document. When the user knows the syntax well, the sample is slightly annoying because one has to delete it manually, though.

aaubry avatar May 10 '16 15:05 aaubry

thank you for the suggestion @madskristensen, much appreciated!

@aaubry kk, in which case we could have two item templates, one with sample data and one empty?

TheBeardedLlama avatar May 10 '16 15:05 TheBeardedLlama