Open mrlacey opened 2 years ago
Basically, as I mention, I am now using this to access my code snippets; I find that using the standard Visual Studio implementation of having to assign shortcuts to snippets can soon get overwhelming in terms of having too many suggestions in Intellisense, or having to remember the shortcuts.
So, what I had started doing was dragging text to the Toolbox, and using that as a way to quickly access snippets. That way, I can do common tasks such as adding Jwt Authentication to a Web Api very quickly, with a click. I can organise them more easily, and search for them quickly.
But, the downside to that approach was that there was no simple way to export and import them; I might be mistaken, but it seems you can only do that in the Toolbox windows when using Windows Forms projects.
So, I have found your extension to be most useful.
The main suggestion is to be able to load the demosnippets from a directory, so I can manage them and share them in their own Git repo, and then have them available in every project automatically.
One other downside of the Toolbox approach was it doesn't support the smart placeholders that can be created in standard snippets, if that was supported, I would be very happy, but it's probably never going to happen. I am not sure if it is possible to trigger the standard snippet behaviour for newly placed text.
But, the downside to that approach was that there was no simple way to export and import them; I might be mistaken, but it seems you can only do that in the Toolbox windows when using Windows Forms projects.
Capabilities relating to the toolbox are defined by the project system for each language/project type. Unfortunately, that makes things a bit inconsistent. :(
The main suggestion is to be able to load the demosnippets from a directory, so I can manage them and share them in their own Git repo, and then have them available in every project automatically.
This sounds like a useful enhancement to the capabilities of this extension. :)
One other downside of the Toolbox approach was it doesn't support the smart placeholders that can be created in standard snippets, if that was supported, I would be very happy, but it's probably never going to happen. I am not sure if it is possible to trigger the standard snippet behaviour for newly placed text.
I'm not sure of a way to reuse the existing snippet interaction for moving through placeholders. Recreating it from scratch is a bit beyond me right now. :(
Well, I seem to have hacked something together, following the existing approach, that adds optional support for additionally loading demosnippets files from a file location.
List of demosnippets from both solution and filesystem:
Options:
I'll try it in anger for a little while, see if there are any issues, tidy it up, and make a PR...
From https://marketplace.visualstudio.com/items?itemName=MattLaceyLtd.DemoSnippets&ssr=false#review-details