简体   繁体   English

CLion中C文件的自定义文件模板

[英]Custom file template for C files in CLion

I want to create author header for C file in CLion (it use Apache Velocity template language ) wich looks like this: 我想在CLion (它使用Apache Velocity模板语言 )中为C文件创建作者标头,如下所示:

/*********************************/
/* ${FILE_NAME}                  */
/*                               */
/* By: ${USER}                   */
/*                               */
/* Created: ${DATE} by ${USER}   */
/* Updated: ${??} by ${USER}     */
/*                               */
/*********************************/

There are two problems: 有两个问题:
1. How to add Updated date and how can I change it format? 1.如何添加Updated date ,如何更改其格式?
2. I want to fix the width of header, now its width varies depending on length of the FILE_NAME and USER . 2.我想固定标题的宽度,现在它的宽度取决于FILE_NAMEUSER长度。 How can I fix it? 我该如何解决?

Seems we are discussing Copyright comment. 似乎我们正在讨论版权评论。 Here is the description. 这是说明。 $today macro is your choice. $today宏是您的选择。

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

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