Home

Awesome

⚠️ Project archived. Have a look at unfog, its successor.

Kronos.vim Build Status

A simple task and time manager.

<p align="center"> <img src="https://user-images.githubusercontent.com/10437171/50441115-77205f80-08f9-11e9-97d4-b7b64741d8f2.png"></img> </p>

Table of contents

Requirements

Usage

:Kronos

Then you can create, read, update, delete tasks using Vim mapping. The table will automatically readjust when you save the buffer (:w).

Create

To create a task, you can:

Create
task

A tag should start by a +. You can add as many tags as you need.

A due should start by a :. There is 3 kinds of due:

Here some use cases:

Actual dateGiven patternDue
03/03/2019 21:42:404/03/2019 00:00
03/03/2019 21:42:202/04/2019 00:00
03/03/2019 21:42:0304 or :03403/04/2019 00:00
03/03/2019 21:42:3004 or 30430/04/2019 00:00
03/03/2019 21:42:020202/02/2020 00:00
03/03/2019 21:42:02022102/02/2021 00:00
03/03/2019 21:42::2203/03/2019 22:00
03/03/2019 21:42::1904/03/2019 19:00
03/03/2019 21:42:4:215004/03/2019 21:50
03/03/2019 21:42:2d05/03/2019 21:42
03/03/2019 21:42:1w10m10/03/2019 21:52
03/03/2019 21:42:1y13mo1h03/04/2021 22:42

Note: the date format is DD/MM/YYYY HH:MM

Read

To show focused task details, press <K>:

Read
task

Update

To update a task, just edit the cell and save:

Update
task

For the due field, you need to use the Kronos due format (:18, :20:1230, 2w...).

Start/stop

To start/stop a task, press <Enter>:

Start/stop
task

Done

To mark a task as done, delete the line:

Done
task

Hide done tasks

To show/hide done tasks, press <gh> (for go hide):

Hide done
tasks

Context

The context filters tasks by a list of tags. Once set up:

To set up a context, press gc (for go to context), and type all tags you want in your context (separated by spaces). Typing an empty context removes it:

Set
context

Sort

You can sort tasks by pressing gs (for ascending) or gS (for descending). The sort depends on the position of the cursor. For eg, if it's in the ID column, it will sort the ids.

Note: once the tasks sorted, the buffer will be considered as modified, no matter the result.

Worktime

The worktime allows you to check how much time you spent on one or many tags, grouped by day. Press gw (for go to worktime), and type the tags you want to calculate the total worktime:

Worktime

You can also add a beginning date with >DDMMYY:HHMM and a ending date with <DDMMYY:HHMM. (they can be absolute dues or approximative dues, but not relative dues). Here some valid options:

Delete

To delete a task, delete the line when done tasks are shown:

Delete
task

Backend

By default, Kronos stores tasks in a file (/path/to/vim/pluggins/kronos.vim/.database). You can define an additionnal backend (for now, only Taskwarrior is available):

let g:kronos_backend = 'file' | 'taskwarrior'

This way, tasks will be synchronized with Taskwarrior. It means you can manage basic actions with Kronos, and manage advanced ones with Taskwarrior CLI.

Note: the synchronization is only from Kronos to Taskwarrior. To synchronize from Taskwarrior to Kronos, check the import section below.

Import

If you want to import your Taskwarrior tasks into Kronos, you can use the import.py script at the root folder of the plugin. Usage:

./import.py taskwarrior ./path/to/your/backlog.data

Note: this will erase the current database

Mappings

Here the default mappings:

FunctionMapping
Toggle task<CR>
Show task infosK
Set contextgc
Sort (asc)gs
Sort (desc)gS
Hide/show done tasksgh
Show worktimegw
Jump to the next cell<C-n>
Jump to the prev cell<C-p>
Delete in celldic
Change in cellcic
Visual in cellvic

You can customize them:

nmap <cr>   <plug>(kronos-toggle)
nmap K      <plug>(kronos-info)
nmap gc     <plug>(kronos-context)
nmap gs     <plug>(kronos-sort-asc)
nmap gS     <plug>(kronos-sort-desc)
nmap gh     <plug>(kronos-hide-done)
nmap gw     <plug>(kronos-worktime)
nmap <c-n>  <plug>(kronos-next-cell)
nmap <c-p>  <plug>(kronos-prev-cell)
nmap dic    <plug>(kronos-delete-in-cell)
nmap cic    <plug>(kronos-change-in-cell)
nmap vic    <plug>(kronos-visual-in-cell)

Contributing

Git commit messages follow the Angular Convention, but contain only a subject.

Use imperative, present tense: “change” not “changed” nor “changes”<br>Don't capitalize first letter<br>No dot (.) at the end

Code should be as clean as possible, variables and functions use the snake case convention. A line should never contain more than 80 characters.

Tests should be added for each new functionality. Be sure to run tests before proposing a pull request.

Changelog

Credits