This plugin provides a simple way to insert the current date and time into your editor using custom commands and formats.
- Enter
/xzor/nowto insert the complete date and time, like2023-08-19 18:59:41. - Enter
/sjor/timeto insert only the time, like18:59:41. - Enter
/rq,/date,/jt, or/todayto insert the current date, like2023-08-19.
The above are the built-in commands and templates of the plugin, but you can also configure custom commands in the settings.
You can tailor the commands and templates by adjusting the plugin settings to suit your needs.
-
Time Formatting: Customize the format for the date and time insertion.
- For example,
yyyy-MM-dd HH:mm:sswill output2020-01-01 12:00:00. - You can also format in various styles, such as
yyyy 年 MM 月 dd 日for2023 年 09 月 12 日, orEEEE yyyy-MM-ddforSunday 2023-09-12.
- For example,
-
Custom Commands: Define your own commands following the
/symbol.- Multiple commands can be separated by commas, such as
rq,nowto allow both/rqand/dateto insert the date.
- Multiple commands can be separated by commas, such as
Available Template Placeholders:
yyyy— Year, e.g.,2023MM— Month, e.g.,09dd— Day, e.g.,12HH— Hour, e.g.,18mm— Minute, e.g.,59ss— Second, e.g.,41yy— Last two digits of the year, e.g.,23e— Day of the week as a number (1-7)E— Day of the week abbreviation, e.g.,SunEEEE— Full name of the day of the week, e.g.,SundayECN— Chinese abbreviation for the day of the week, e.g.,一 - 日