Visual Studio
This extension makes it possible to type out a snippet, character by character, by pressing any button.This is the perfect extension for people showing code on stage, in a classroom, or a workshop.
Steps:
1. Select some code
2. Right-click and select Create snippet
3. Name the snippet
4. Now type the name of the snippet in a comment in the code //Snippetname (most comment types work)
5. Make sure the cursor is on the same line as the comment Press CTRL + TAB + TAB
The Extension now takes over, and you can press any button (except TAB) to type one character at a time.
6. To exit the extension, press TAB.
The snippets are saved in a " Snippets" folder in the solution folder.
Commands
CTRL + TAB + TAB is the default key combination. However, you can remap it in Tools | Options | Keyboard.In some cases, you need to remap it to make it work.
There are three commands:
StageCoder.Reloadsnippets
If you copy snippets or manipulate them outside the extension, this will reload the snippets.
StageCoder.Replacecode
It will replace the comment with the snippet without typing each character.
StageCoder.Typecode
It will enable you to press any button (except TAB) to type one character at a time taken from the snippet.
Stream Deck
While presenting, we can also use a Stream Deck by using the "Visual Studio"-plugin by Nicollas R.Adding the commands above can trigger the different commands by pressing the Stream Deck button.
To configure the type command, do the following:
1. Install the Visual Studio plugin from the plugin store.
2. Drag Execute Command to a button.
3. Add a Title (This can be anything)
4. Add a Command(Name) in this case StageCoder.Typecode
5. Command args can be used in three ways.
Empty - Will use the current line in Visual Studio to figure out the snippet name.
SnippetName - By supplying it with a snippet name, you can trigger that particular snippet.
[clipboard] - Will take the current text on the clipboard and use that as a snippet.