File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ local DefaultConfig = {
144144 org_schedule = ' <prefix>is' ,
145145 org_time_stamp = ' <prefix>i.' ,
146146 org_time_stamp_inactive = ' <prefix>i!' ,
147+ org_toggle_timestamp_type = ' <prefix>!' ,
147148 org_insert_link = ' <prefix>il' ,
148149 org_clock_in = ' <prefix>xi' ,
149150 org_clock_out = ' <prefix>xo' ,
Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ return {
131131 ' org_mappings.org_time_stamp' ,
132132 { args = { true }, opts = { desc = ' org timestamp (inactive)' } }
133133 ),
134+ org_toggle_timestamp_type = m .action (
135+ ' org_mappings.org_toggle_timestamp_type' ,
136+ { opts = { desc = ' org toggle timestamp type' } }
137+ ),
134138 org_insert_link = m .action (' org_mappings.insert_link' , { opts = { desc = ' org insert link' } }),
135139 org_clock_in = m .action (' clock.org_clock_in' , { opts = { desc = ' org clock in' } }),
136140 org_clock_out = m .action (' clock.org_clock_out' , { opts = { desc = ' org clock out' } }),
Original file line number Diff line number Diff line change @@ -972,6 +972,16 @@ function OrgMappings:org_time_stamp(inactive)
972972 end )
973973end
974974
975+ function OrgMappings :org_toggle_timestamp_type ()
976+ local date = self :_get_date_under_cursor ()
977+ if not date then
978+ return
979+ end
980+
981+ date .active = not date .active
982+ self :_replace_date (date )
983+ end
984+
975985--- @param direction string
976986--- @param use_fast_access ? boolean
977987--- @return string
You can’t perform that action at this time.
0 commit comments