Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert timestamp #36

Open
amay5267 opened this issue Oct 12, 2022 · 5 comments
Open

Insert timestamp #36

amay5267 opened this issue Oct 12, 2022 · 5 comments

Comments

@amay5267
Copy link

amay5267 commented Oct 12, 2022

Hi @magiblot

Any API to insert current timestamp like this?:
Wed Oct 12 15:15:00 2022

@magiblot
Copy link
Owner

Hi @amay5267,

I'm sorry, I do not intend to add a feature like this. I have seen you were able to achieve this in Textadept, but it makes sense there since you can write your own lua scripts. Turbo does not support scripting and I don't think there should be a specific feature for this.

@amay5267
Copy link
Author

amay5267 commented Nov 10, 2022

Hi @magiblot
I am very sorry to hear that.
It is such a basic feature for text editor.
For example Notepad in Windows is doing it.

https://support.microsoft.com/en-us/topic/how-to-use-notepad-to-create-a-log-file-dd228763-76de-a7a7-952b-d5ae203c4e12

I am willing to implement it.
Is it ok for turbo using cpp chrono library?

@amay5267
Copy link
Author

Would Ctrl+D or Ctrl+T be right shortcut?

@magiblot
Copy link
Owner

Hi @amay5267! I didn't know Notepad had such a feature. I have nothing against implementing this in the same way as Notepad does it. If you are willing to give a try at implementing it, using functions from the standard library is perfectly fine.

Would Ctrl+D or Ctrl+T be right shortcut?

No, these shortcuts are assigned to more important commands. It should be enough to add a menu entry (Edit > Insert Time/Date, like in Notepad).

@magiblot magiblot reopened this Nov 10, 2022
@amay5267
Copy link
Author

amay5267 commented Dec 5, 2022

As a workaround I use this Unix command output:
date -R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants