File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1031,6 +1031,9 @@ Decrease date under cursor by 1 or "count" day(s) (Example count: `5<S-UP>`).
1031
1031
#### ** org_change_date**
1032
1032
* mapped to* : ` cid ` <br />
1033
1033
Change date under cursor. Opens calendar to select new date
1034
+ #### ** org_toggle_timestamp_type**
1035
+ * mapped to* : ` <Leader>od! ` <br />
1036
+ Switches the timestamp under the cursor between inactive and active.
1034
1037
#### ** org_priority**
1035
1038
* mapped to* : ` <Leader>o, ` <br />
1036
1039
Choose the priority of a headline item.
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ local DefaultConfig = {
161
161
org_schedule = ' <prefix>is' ,
162
162
org_time_stamp = ' <prefix>i.' ,
163
163
org_time_stamp_inactive = ' <prefix>i!' ,
164
+ org_toggle_timestamp_type = ' <prefix>d!' ,
164
165
org_insert_link = ' <prefix>li' ,
165
166
org_store_link = ' <prefix>ls' ,
166
167
org_clock_in = ' <prefix>xi' ,
Original file line number Diff line number Diff line change @@ -351,6 +351,10 @@ return {
351
351
' org_mappings.org_babel_tangle' ,
352
352
{ opts = { desc = ' org tangle' , help_desc = ' Tangle current file' } }
353
353
),
354
+ org_toggle_timestamp_type = m .action (
355
+ ' org_mappings.org_toggle_timestamp_type' ,
356
+ { opts = { desc = ' org toggle timestamp type' , help_desc = ' Toggle timestamp active/inactive type' } }
357
+ ),
354
358
},
355
359
edit_src = {
356
360
org_edit_src_abort = m .custom (
Original file line number Diff line number Diff line change @@ -1020,6 +1020,16 @@ function OrgMappings:org_time_stamp(inactive)
1020
1020
end )
1021
1021
end
1022
1022
1023
+ function OrgMappings :org_toggle_timestamp_type ()
1024
+ local date = self :_get_date_under_cursor ()
1025
+ if not date then
1026
+ return
1027
+ end
1028
+
1029
+ date .active = not date .active
1030
+ self :_replace_date (date )
1031
+ end
1032
+
1023
1033
--- @param direction string
1024
1034
--- @param use_fast_access ? boolean
1025
1035
--- @return boolean
You can’t perform that action at this time.
0 commit comments