how to change the author variable in PyCharm

Settings (or Default Settings) >> Editor >> File and Code Templates >> File type (e.g.: Python Script)

enter image description here


I just had the same problem as you, and found the best answer to it here:

http://www.jetbrains.com/pycharm/webhelp/creating-and-editing-file-templates.html#d600783e347

You can't just change exisitng variables, but you can create your own ones. I encourage you to use this solution, instead of replacing the variable by your full name. Sooner or later you will run in the situation, that you need it in more than one file template and in that moment it will become a fun killer to rechange your name in each template.

TL;DR Goto Settings | File Templates switch to Includes tab, create a new file and type e.g. #set( $MyName = "John Smith" ). Then go to your template in the Templates tab and add to the template on the top #parse ("your-include-name.your-extension") Now you can use $MyName in this template.


Assuming this is on Windows environment and the Pycharm is installed under path:

X:\Program Files (x86)\JetBrains\PyCharm x.x.x\

editing

X:\Program Files (x86)\JetBrains\PyCharm x.x.x\bin\pycharm.exe.vmoptions

adding line:

-Duser.name=MyName<[email protected]>

restart PyCharm


Open Settings | File Templates and change the text of "File Header" template to use your full name instead of ${USER}.

Tags:

Pycharm