2

Specifically, I would like to use a keyboard shortcut instead of the 'Insert Date and time...' plugin. This snippet will be used for log files that are used frequently. The snippet will allow for formatting such as line feeds and dashed-line separators.

Mark Hurd
  • 10,665
  • 10
  • 68
  • 101
Glenn Wark
  • 1,499
  • 4
  • 19
  • 23

2 Answers2

3

As the link in Anna's answer is now obsolete, here is a snippet using a shell command (on Unix):

$(1:date +%Y-%m-%d)

Use

date --help

to know more about available formatting options.

I guess you could also do the same with some Python snippet (using $<>). More there.

viphe
  • 689
  • 8
  • 16
3

I think that the article GEdit Snippet to insert date and time covers basically what you need.

Update (the old link stopped working):

You can use a keyboard shortcut for the plugin. Alt + e → s → Enter.

Ania Warzecha
  • 1,796
  • 13
  • 26