设置VS快捷代码片段

1、在VS安装路径【D:\vs2013\VC\Snippets\2052\Visual C++】下新建一个snippt文件

2、添加代码

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>jude</Title>
<Shortcut>jude</Shortcut>
<Description>注释片段</Description>
<Author>rainbow</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>expression</ID>
<ToolTip>注释</ToolTip>
<Default>true</Default>
</Literal>
</Declarations>
<Code Language="cpp">
<![CDATA[
/*****************************************************************/
//作者:朱小勇
//函数名称:NULL
//函数参数:NULL
//函数返回值:NULL
//函数作用:NULL
//备注:NULL
/*****************************************************************/
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>

3、重启VS

4、输入jude,按table键弹出来来定义的注释片段

猜你喜欢

转载自www.cnblogs.com/judes/p/9107617.html