简体   繁体   English

文件模板C ++ Visual Studio 2012

[英]File template C++ Visual Studio 2012

Is it possible in Visual Studio, when creating a new file, producing automatically something like this: 在Visual Studio中创建新文件时,是否可以自动生成如下内容:

// <filename>.<ext>
//   Author: <name>
//   Update: <date>

I'm currently working with C++ projects, and this would be very helpfull! 我目前正在处理C ++项目,这将非常有帮助!

EDIT: 编辑:

Using Visual Assist X should be fine! 使用Visual Assist X应该没问题! I'll update 我会更新
Yes, I will definitely use Visual Assist X! 是的,我一定会使用Visual Assist X!

Add a file like you show to an existsing project, then use File->Export Template... and select the file you just created. 将类似您显示的文件添加到现有项目,然后使用File->Export Template...然后选择刚刚创建的文件。 It will create a template for you, and by editing the files in the zip it you can get pretty close. 它将为您创建一个模板,通过编辑zip中的文件,您可以非常接近它。 Not sure if you can get the date right though. 不确定是否可以正确安排日期。

Alternatively you can create a snippet for it, but that's less extensible. 另外,您可以为其创建一个代码段,但是它的扩展性较差。

Finally as WhozCraig suggested: creating Add-Ins is not too hard and gives you total control. 最后,正如WhozCraig所建议的那样:创建加载项并不难,可以完全控制您。

我在设置选项中什么都没看到,但是为什么不保存一个空的C ++文件,而该文件只是您添加到项目中的,如果我发现任何东西,我都会对其进行更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM