Sublime Forum

Keystroke to show date/time/day of week

#1

I currently have the following set in my

Default (Windows) .sublime-keymap - User

file:

{“keys”: [“ctrl+t”], “command”: “tn_datetime”},

This produces output like the following:

2020-12-10 08:21

I’d like to set up a similar key binding that also shows the day of the week, like this:

2020-12-10 08:21 Wednesday

I’m at a loss how to accomplish this. Advice gratefully welcomed.

0 Likes

#2

By the way, it’s a good practice that you provide the information about what plugin is used. That may increase the possibility of being answered.

0 Likes

#3

@jfcherng You’ve correctly inferred that I’m using the timenow plugin.

In the file:

Sublime Text 3\Packages\User\Timenow.sublime-settings

I’ve added the following:

{
“datetimeday_format”: “%Y-%m-%d %H:%M %A”
}

In my key bindings I’ve added the following line:

{“keys”: [“alt+t”], “command”: “tn_datetimeday”},

However, when I press alt+t no effect is observed.

Is there some step I’ve missed?

0 Likes

#4

I don’t think the plugin provides that command. https://github.com/filipelinhares/timenow-sublime/blob/95ec6c0edb6dc354d8a3cf9f0d6682dc8a9e153b/Timenow.py#L26-L47

0 Likes