为CLion所编写的自动文件添加头部注释

想标记自己所编写的文档的一些默认信息,并且注明出处和作者,一个一个编写太过繁琐,和PyCharm相同,CLion也支持自动添加文件头部注释。

首先,在CLion工具栏点击FILE,点击settings,在Editor下找到File and templates,如图:

File-->settings-->Editor-->File and templates

 相关的编写格式可以参加官网说明文档(http://www.jetbrains.com/help/clion/settings-file-and-code-templates.html),此列举一二:

VariableDescription
${CALL_SUPER}Base function call signature during the override generation
${DATE}Current system date
${DAY}Current day of the month
${DEFAULT_RETURN_VALUE}Default return value of the function
${DS}Dollar sign ($). This variable is used to escape the dollar character, so that it is not treated as a prefix of a template variable.
${END}Caret position after you finish editing the variables
${FILE_NAME}Name of the new C or C++ file
${HEADER_COMMENTS}Always returns true and is used for testing purposes
${HEADER_FILENAME}Name of the header file generated for a class or a source file
${HOUR}Current hour
${INCLUDE_GUARD}Prevents repeated include of a particular header file
${MINUTE}Current minute
${MONTH}Current month
${MONTH_NAME_FULL}Full name of the current month (January, February, etc.)
${MONTH_NAME_SHORT}First three letters of the current month name (Jan, Feb, etc.)
${NAME}Name of the new entity (file, class, interface, and so on)
${NAMESPACE_CLOSE}End of a namespace block created during refactoring
${NAMESPACE_OPEN}Beginning of a namespace block created during refactoring
${PRODUCT_NAME}Name of the IDE (for example, CLion)
${PROJECT_NAME}Name of the current project
${RETURN_TYPE}Type of the function's return value (used for generating new functions)
${SUIT_NAME}Google test suite name
${TEST_NAME}Google test name
${TIME}Current system time
${USER_NAME}

For Windows and Linux: login name of the current user

For macOS: registered full name of the user

${YEAR}Current year

 

 

  • 8
    点赞
  • 32
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值