When using code snippets in Visual Studio that contain multiple lines, the following lines retain the spaces that were set in the .snippet file, rather than positioning the code relative to the original cursor location.
When using the foreach snippet, you will get the code as follows:
foreach (var item in collection) { }
Instead:
foreach (var item in collection) { }
Is there any way to change this behavior? Is there a keyword that needs to be used in a .snippet file?
visual-studio code-snippets
toluca70
source share