To create new file from template with default file name
Answered
How to write a template to create a new file with default file name?
For instance, we can create a new 'setup.py' from Pycharm menu.
This has a default name as 'setup'.
I know that there is a built-in parameter like ${NAME}.
Although I try to set this one by using something like
#set ( ${NAME} = 'default-name')
, when the new file created with this template,
it turns out that the dialog box appears with the empty file name field.
Please sign in to leave a comment.
Hi Epsilonxe,
Thank you for contacting PyCharm support.
Unfortunately, it is not possible at the moment.
Kind regards,
Sergey
https://www.jetbrains.com
The Drive to Develop
This could be useful in some contexts. For example, it's common to include a "index.js/ts" file in javascript lib folders for exports.
Please vote for the relevant feature request https://youtrack.jetbrains.com/issue/IDEA-127570