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>`).
10311031#### ** org_change_date**
10321032* mapped to* : ` cid ` <br />
10331033Change 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.
10341037#### ** org_priority**
10351038* mapped to* : ` <Leader>o, ` <br />
10361039Choose the priority of a headline item.
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ local DefaultConfig = {
161161 org_schedule = ' <prefix>is' ,
162162 org_time_stamp = ' <prefix>i.' ,
163163 org_time_stamp_inactive = ' <prefix>i!' ,
164+ org_toggle_timestamp_type = ' <prefix>d!' ,
164165 org_insert_link = ' <prefix>li' ,
165166 org_store_link = ' <prefix>ls' ,
166167 org_clock_in = ' <prefix>xi' ,
Original file line number Diff line number Diff line change @@ -351,6 +351,10 @@ return {
351351 ' org_mappings.org_babel_tangle' ,
352352 { opts = { desc = ' org tangle' , help_desc = ' Tangle current file' } }
353353 ),
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+ ),
354358 },
355359 edit_src = {
356360 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)
10201020 end )
10211021end
10221022
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+
10231033--- @param direction string
10241034--- @param use_fast_access ? boolean
10251035--- @return boolean
You can’t perform that action at this time.
0 commit comments