Extension for vscode: Bringing "surround with" functionality to vscode.

Oleksii Nikiforov - Aug 25 '20 - - Dev Community

I would like to share with you an extension for vscode that allows you to wrap your code in C# snippets. (marketplace.visualstudio.com/surround-with-csharp)

This extension supports different concepts to trigger functionally to surround your code.

Source code: https://github.com/NikiforovAll/surround-with-csharp

CompletionProvider

You can just simply hit CTRL + SPACE and if you have some code selected, you will get completion items that you can choose from by using arrow keys:

surr-w-cs-d2

Commands

If your favorite command-pallette. You can invoke command "C#: Surround With" (or CTRL+SHIFT+S, CTRL+SHIFT+S) and you will be prompted for a code snippet.

surr-w-cs-d1

Hope you find this useful, have fun! 🎉

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .