aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-03-11 06:54:00 -0400
committerjgmdev <jgmdev@gmail.com>2022-05-22 13:16:10 -0400
commit8ff3b1ed350d06a5bd791d4cb23ba3f7f6f81b45 (patch)
treee4d0699708bb2ae4b59462ff0c1fe779d23285e8 /plugins
parent2705f3ef88fe72318e3c3d7e78d53a1b6f486849 (diff)
downloadlite-xl-plugins-8ff3b1ed350d06a5bd791d4cb23ba3f7f6f81b45.tar.gz
lite-xl-plugins-8ff3b1ed350d06a5bd791d4cb23ba3f7f6f81b45.zip
datetimestamps: added insert custom command
Diffstat (limited to 'plugins')
-rw-r--r--plugins/datetimestamps.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/datetimestamps.lua b/plugins/datetimestamps.lua
index bd208f7..2880f99 100644
--- a/plugins/datetimestamps.lua
+++ b/plugins/datetimestamps.lua
@@ -27,8 +27,8 @@ from https://www.lua.org/pil/22.1.html
%% the character `%ยด
--]]
config.plugins.datetimestamps = common.merge({
- format_datestamp = "%Y%m%d"
- format_datetimestamp = "%Y%m%d_%H%M%S"
+ format_datestamp = "%Y%m%d",
+ format_datetimestamp = "%Y%m%d_%H%M%S",
format_timestamp = "%H%M%S"
}, config.plugins.datetimestamps)
@@ -50,6 +50,11 @@ end
command.add("core.docview", {
["datetimestamps:insert-datestamp"] = datestamp,
["datetimestamps:insert-timestamp"] = timestamp,
- ["datetimestamps:insert-datetimestamp"] = datetimestamp
+ ["datetimestamps:insert-datetimestamp"] = datetimestamp,
+ ["datetimestamps:insert-custom"] = function()
+ core.command_view:enter("Date format eg: %H:%M:%S", function(cmd)
+ core.active_view.doc:text_input(os.date(cmd) or "")
+ end)
+ end,
})