VisualStudio 에는 code snippet 이 몇 개 있다.
cw -> tab -> tab : Console.WriteLine
ctor -> tab -> tab : 클래스 생성자 함수
foreach -> tab -> tab : foreach 구문 생성.. 등
그런데, cw 를 많이 쓰긴 하지만, Debug.WriteLine 을 써야할 때 snippet 이 없어서 불편...
그래서 만들어 보자!
참조 : [여기]
1. 아래 내용을 파일로 저장 (dw.snippet) 확장자는 꼭 snippet 으로 해야 함.
2. Visual Studio 에서 Ctrl+K, Ctrl+B 한 다음
3. Import...
4. Finish 버튼
5. 끝.
이제 dw->tab->tab 치면 Debug.WriteLine 이 나온다!
=================
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>dw</Title>
<Shortcut>dw</Shortcut>
<Description>Code snippet for Debug.WriteLine</Description>
<Author>Chris Schmich</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>System.Diagnostics</Namespace>
</Import>
</Imports>
<Declarations>
<Literal Editable="false">
<ID>Debug</ID>
<Function>SimpleTypeName(Debug)</Function>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[$Debug$.WriteLine($end$);]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
=================





최근 덧글