Skip to content

Commit 794de13

Browse files
committed
feat: timestamp 时间戳快捷输入
1 parent f3fe67b commit 794de13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/mint_date_time_translator.lua

+7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
3. 输入 time 可以出现当前的时间
77
4. 输入 month 可以出现当前的月份
88
5. 输入 datetime 可以出现当前时间节点
9+
6. 输入 timestamp 可以出现当前时间戳
910
1011
参考借鉴: https://github.com/KyleBing/rime-wubi86-jidian
1112
1213
Mintimate 修改内容:
1314
1. 适配权重
1415
2. 注解添加
16+
JacianLiu 修改内容:
17+
1. 增加时间戳
1518
1619
--]]
1720

@@ -108,6 +111,10 @@ function mint_date_time_translator(input, seg)
108111
yield(make_hight_quality_candidate("month", seg.start, seg._end, os.date("%B"), "全称"))
109112
yield(make_hight_quality_candidate("month", seg.start, seg._end, os.date("%b"), "缩写"))
110113
end
114+
115+
if (input == "timestamp") then
116+
yield(make_hight_quality_candidate("timestamp", seg.start, seg._end, string.format('%d', os.time()), ""))
117+
end
111118
end
112119

113120
return mint_date_time_translator

0 commit comments

Comments
 (0)