Reputation: 1825
I am starting to work on the Kotlin project. So, whenever I create a new file I do not get author template by default.
I want to know that how to activate author template in the android studio for Kotlin.
Upvotes: 1
Views: 1235
Reputation: 518
Consider using the Copyright profile, you can have multiple profiles. In the settings dialog search for Copyright Profiles. Add the profile. Name and write the file header you want, apply, ok. Then go back to Settings dialog and search for Copyright. Default project copyright, change from "No copyright" to the one create. Click the + for scope, click all to change to desired scope, ex: Project Source Files. There is no retroactive, new scope, Open Files does not add to open files.
Upvotes: 1
Reputation: 296
Go to Settings -> Editor -> File and Code Templates -> Includes -> File Header add the #set() function call,
for example:
#set( $USER = "Your name" )
/**
* Created by ${USER} on ${DATE}.
*/
finally enable live templates.
Upvotes: 3