

If you don't want to install and just run the tool you can clone or download the Github repo and then: cd. NET SDK 2.1 or later) which is installable via Nuget: dotnet tool install -global dotnet-snippetconverter You can download and run the Visual Studio Snippet Converter as. NET related snippets and a one-time export since the crazy GUID based key system in Rider doesn't allow for finding existing snippets without the GUID. NET related snippets (C#,VB,F#, Razor, ASPNET) and the Web based ones (html,css,js etc.). It also uses a couple of completely different storage engines for the. I can also re-run the export multiple times and easily create new snippet files for the exports to compare/update as needed.įor Rider the story is more complicated as Rider has a crazy mechanism for storing templates in an internal, single configuration file. However, for my snippets all 137 of them ported over nicely to VS Code, and as far as I can tell they all work.
VSCODE SNIPPETS CODE
If you just want to jump in, you can find the code on GitHub:Ī word of warning - this is a hacky project, and there's no guarantee that it'll work with all types of snippets that are supported. So over the last couple of weekends I threw together a small utility that allows me to move my Visual Studio snippets to Visual Studio Code snippets and - with limited features - to JetBrains Rider.

It sure would be a lot nicer to do this directly in each respective environment. Tedious, but still faster than manually copying code from a Doc site and then manually customizing these longer blocks of text with the appropriate insertions added. In fact, I missed this stuff so much that sometimes I'd just fire up Visual Studio with an HTML editor open, just to expand HTML snippets I need, and then paste them back into VS Code or Rider. With snippets this stuff auto-fills and with a few keystrokes customizes my specific use case which saves me tons of time every day. Over the many years of using Visual Studio, I've accumulated 130+ code snippets and when I'm working in other environments I really miss them, especially the HTML ones for long blocks that are painful to look up on doc sites and then customize. Two tools in particular: Visual Studio Code and JetBrains Rider. Over the last couple of years I have been more and more using other tools in combination with Visual Studio. There are few others for JavaScript, XAML and even some Powershell ones. I have quite a few C# code snippets, but even more I use the HTML snippets for things like my Bootstrap customized snippets, snippets for complex HTML controls and the like. Visual Studio has very nice Code Snippet facility built into it and over the years I've been using it to create a ton of useful expansion snippets that make my day to day development easier.
