Sublime Forum

Insert date

#1

Hello Forum!

I think it would be very nice to introduce date insertion with Ctrl+; (semicolon) like in MS Excel.
The date insertion should be configurable, being default for “2019-02-22”.

What do you think guys?

0 Likes

#2

You can achieve that by installing the InsertDate package and customizing a key binding to work the way you’d like.

0 Likes

#3

Thanks! That did the trick.
Ctrl+Shift+F5 and then Ctrl+Shift+d makes what I need.

But I didn’t found place to make it work via Shift+F5, which file should be edited for that?

"keys": ["shift+f5"],
"command": "insert_date",
"args": {"format": "%Y-%m-%d"}
0 Likes

#4

It doesn’t look like there’s a default binding for that; so you want to pick Preferences > Key Bindings to open your custom keyboard bindings, and then add this key binding in the right hand pane:

  { "keys": ["shift+f5"],
    "command": "insert_date",
    "args": {"format": "%Y-%m-%d"} },
0 Likes

#5

Very nice! Thank you!

0 Likes