Skip to content

productivitykit/org-virtual-clocktime.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-virtual-clocktime.nvim

Sum logbook clocktime with virtual text:

** Sample header
   :LOGBOOK: => 0:41
   CLOCK: [2026-01-25 Sun 15:33]--[2026-01-25 Sun 15:37] => 0:04
   CLOCK: [2026-01-25 Sun 14:53]--[2026-01-25 Sun 15:30] => 0:37
   :END:

Installation

In this example, we're using lazy.nvim as our package manager and including org-journal.nvim as a dependency of nvim-orgmode:

{
  "nvim-orgmode/orgmode",
  ft = { "org" },
  cmd = "Org",
  dependencies = {
    {
      "productivitykit/org-virtual-clocktime.nvim"
    }
  }
}

Configuration

{
  hl_group = "@comment",
  update_events = { "BufEnter", "BufWritePost", "InsertLeave" },
  format = function(minutes)
    local hours = math.floor(minutes / 60)
    local mins = minutes % 60
    return string.format("=> %d:%02d", hours, mins)
  end,
  enabled = true,
}

Override any of these options by passing them to setup().

Usage

Within an orgmode buffer, clocktime sums are automatically calculated and displayed. However, a command is available to control the displayed text:

  • :OrgVirtualClocktime update - Manually update virtual text
  • :OrgVirtualClocktime toggle - Toggle plugin on/off
  • :OrgVirtualClocktime clear - Clear all virtual text

About

Sum logbook clocktime with virtual text

Topics

Resources

License

Stars

Watchers

Forks

Languages