dfb903e8b0
* [Toold] Add editor snippets to help new developers. We do have a few tings that we have to do manually yet it is repetitive, I am adding the vscode (soon to come vim) configuration files to provide useful snippets when working with the bindings. The syntax of the snippets present is very simple, there are just two things to understand in these new ones: 1 Tab complitions: $1, $2 etc.. are the tab complitions that the user can provide. This allows the user to navigate and the snippets engine will replace all the complitions with the provided text. 2 Options: We can provide options for tab complitions, for example for the PlatformName, which is a known value. The syntax to do so is {$1|one,two,three|} where: * `$1`: is the tab completion. * `|one,two,three|`: are the options. Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com> |
||
---|---|---|
.. | ||
VSCode | ||
README.md |
README.md
Editors
This directory contains a list of useful settings and snippets to make your life easier. There is a directory per editor that contains recommendations and snippets to be used.
VS Code
You can find the snippets for csharp in the VSCode directory. There are two possible scenarios:
- You do no have snippets setup in your system.
- You do alrady use snippets.
New to snippets
In order to be able to use snippets you need to enable tab completion on vscode, you do so by following the instructions you can find in the vscode documentation.
Copy the snippets file
mkdir -p "~/Library/Application Support/Code/User/snippets"
cp VSCode/* "~/Library/Application Support/Code/User/snippets"
Already have snippets
You are all setup, you just need to merge the contents of the file VSCode/csharp.json with the file in "~/Library/Application Support/Code/User/snippets"