You can create your own:
- In Settings, go to Live Templates
- Add a new template with the abbreviation "date"
- For "template text", specify
$date$
. Now the "Edit Variables" button should be enabled.
- Edit the variables, and set
$date$
to use the expression date()
.
- Enable "Java comment" under the template's context and click OK.
Now when you type "date" and use the default completion gesture (Tab), it will replace "date" with the current date.
You can also make use of the time()
expression. Note that it doesn't seem like IntelliJ has great support for specifying the format of this date.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…