Creating your own code snippets in Visual Studio for Mac to boost your day-to-day productivity has never been easier.
The tool is better explained in detail here with fancy words that I can't use 🙂.
Here, I am just going to create a code snippet for
Observable Property that we love to use, especially in Xamarin.Forms
- First, we have to open Snippets Tool window on VSmac. You can find it under
Preferences > Text Editor > Snippets
- From languages available, select
C#since we are making a code snippet for C#. Then, click Add button on the right. This will pull up a whole new window where you can create your own cool snippets. Fill in all the fields like I have here.
- Be sure to check ✅ the
Is expandable templateso that you can insert the snippet by typing the shortcut and
- Snippet has template text like
$name$which will be replaced by the real name and type later.
$end$template text is where the cursor position will be after the template is created.