Editor Template Includes Extension

Answered

Hello - Under default preferences -> editor -> File and Code Templates -> "includes" tab,  is it possible to have a wildcard Extension?  The use case is for a common header-format across any of the programming languages I am working with.  

If a wildcard extension is not permitted, then am I correct to think an Includes.?? file will be needed for each language?

Thanks

0
3 comments
Avatar
Permanently deleted user

I guess I'd like to understand how important the include file extension is.  

For what it's worth, I used Apache Velocity functionality to determine if my "include-general.py" should populate for work or populate for my personal projects.

#set( $MyName = "Jeff Neuffer" )
#if( $iswork == "yes" )
#set( $CopyrightName = "Org Name" )
#elseif( $iswork == "no" )
#set( $CopyrightName = "Jeff Neuffer" )
#else
#set( $CopyrightName = "fall through" )
#end
"""
-------------------------------------------------------

Copyright ${YEAR} ${CopyrightName} All Rights Reserved

Script Name : ${NAME}
Version : 0.1.0
Created On : ${DATE}
Created By : ${MyName}
Last Modified :
Description : ...Say something snazy...


-------------------------------------------------------
"""

0
Avatar
Permanently deleted user

No response?

0

Hello Jeff,

> Under default preferences -> editor -> File and Code Templates -> "includes" tab,  is it possible to have a wildcard Extension?
Unfortunately, it's not possible now. From https://www.jetbrains.com/help/pycharm/2016.3/creating-and-editing-file-templates.html#d940518e138 :

Click add.png on the toolbar and specify the template name, extension, and the source code.

Please feel free to file a feature request about it to the corresponding issue tracker: https://youtrack.jetbrains.com/issues/IDEA.

0

Please sign in to leave a comment.