Autocompletion of @author in Intellij

rkcpi picture rkcpi · Sep 11, 2013 · Viewed 96.9k times · Source

I'm migrating from Eclipse to Intellij Idea. One thing I couldn't figure out yet is autocompletion of the @author JavaDoc tag. When typing @a in Eclipse, there are two proposals:

@author - author name
@author

How do I achieve the first proposal in Intellij (is it even possible?)? And if it's possible, how do I change the template of what is inserted for the author name placeholder?

Answer

leveluptor picture leveluptor · Sep 23, 2013

One more option, not exactly what you asked, but can be useful:

Go to Settings -> Editor -> File and code templates -> Includes tab (on the right). There is a template header for the new files, you can use the username here:

/**
 * @author myname
 */

For system username use:

/**
 * @author ${USER}
 */

Screen shot from Intellij 2016.02