Replies: 4 comments 1 reply
-
I don't use Timenow, so I don't know how it works or how you could tap into it. You would have to investigate that yourself. As far as doing custom things, you could likely utilize the replace plugin to do what you need. The documentation describes this and shows and example: https://facelessuser.github.io/RegReplace/usage/#custom-replace-plugins. |
Beta Was this translation helpful? Give feedback.
-
I took a look at the documentation in the link provided, but unfortunately there it is an example of incrementing a date that it is found in the document. I am not a programmer, I do know only some very basic Python and I don't understand how I can use this example to insert the current date/time into my text files. I will appreciate if you can provide-me something that I can actually use. Thank you for understanding. P.S. I found some documentation on how to get the NOW date/time in Python, but still I don't know how I can create myself an usable plugin from this: |
Beta Was this translation helpful? Give feedback.
-
Ok, I made some progress, but still need a little bit of help. I created a new module called "TimeNow.py" and placed into "Packages\User" folder.
I assigned a key binding in "Preferences/keybindings/User":
I tested and it is inserting the current Date/Time in document when I do press the F5 key. Now, the only thing missing it is how I can invoke this command in RegReplace to insert the current Date/Time in my files? |
Beta Was this translation helpful? Give feedback.
-
Almost there, still get an error:
I placed the "TimeNow.py" in the "Sublime Text\Packages" folder and created the following reg_replace_rule:
I am invoking my command with:
but unfortunately I do get the above error. |
Beta Was this translation helpful? Give feedback.
-
Hi all. If I understand correctly RegReplace can use external plugins for various tasks.
My question is how I can use the Timenow to insert the datetime that can be found in the Edit/Timenow/Insert datetime from Sublime Text menu after installing the package.
I do need to insert the date and time at which I performed a RegReplace command like:
Date: 2024-10-15 14:15
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions