Pawel napsal(a):
Hello,
I have searched for a way to insert time and date (like notepad with F5)
is there a standard function that I am not seeing at the moment? I
can’t find it on the website or archieves.

Hi,
you can use this lua function (placed into your SciTEStartup.lua):

function insert_date()
  editor:ReplaceSel(os.date("%d.%m.%Y"))
end

I used here czech national date format, so you likely want to change %d.%m.%Y into your desired form. Then you can define action bound with keyboard shortcut like this (into SciTEUser.properties):

command.name.1.*=Insert current date
command.1.*=insert_date
command.subsystem.1.*=3
command.shortcut.1.*=F5

I used F5 you mentioned, but note that this key is currently used for Tools/Run command. So you may want to set it to something else, like Ctrl+Shift+D.

-- Roman

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to