Is there a way to specify not to do automatic formatting in Code Snippets?
I created the following code snippet because I like putting these code separator comment lines between methods.
However, everytime I use this code snippet, it gets auto indented and I always have to delete out the preceding TABs.
Yes, this is how I want it and it's my coding style.
1
2 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3 <CodeSnippet Format="1.0.0">
4 <Header>
5 <Title>Code Separator Comment Line</Title>
6 <Shortcut>sep</Shortcut>
7 <Description>Code snippet for adding a code separator comment line</Description>
8 <Author>Soe</Author>
9 <SnippetTypes>
10 <SnippetType>Expansion</SnippetType>
11 </SnippetTypes>
12 </Header>
13 <Snippet>
14 <Code Language="csharp">
15 ![CDATA[//----------------------------------------------------------------------------------------------------]]>
16 </Code>
17 </Snippet>
18 </CodeSnippet>
19 </CodeSnippets>
namespace MyNameSpace
{
public class MyClass
{
#region Method: MethodA()
public void MethodA()
{
// do something
}
#endregion
//------------------------------------------------------------------------------------------
#region Method: MethodB(int, string)
public void MethodB(int myInt, string myString)
{
// do something
}
#endregion
}
}
Thanks,
Soe