hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 47639074199c9c87bfbbf31557fc2c3d5b4ce3d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# todo

a little modal todo list that lives in my terminal.

## keys

```text
= movement
  h j k l        move (h/l caret in the item, j/k by display line)
  0 / $          start / end of the item
  w / b          next / previous word
  { / }          previous / next section
  gg / G         top / bottom
  3j, 2dd, ...   a count repeats the next motion or operator

= editing
  o              add a new item below
  i              insert at the cursor
  A              append to the item's text
  R              replace mode (overtype from the cursor)
  x              delete the character under the cursor
  cw ce cb       change word (ce to end, cb back)
  c0 c$ cc       change to start / end of line, or the whole line
  ct{c} cf{c}    change up to (cf: onto) the next {c}
  ci{d} ca{d}    change inside / around a pair: () [] {} <> " '
  dw de db d0 d$ delete over the same motions (also dt df di da)
  .              repeat the last change
  >> <<          demote / promote (task <-> subtask, or section depth)
  space          cycle todo -> doing -> done
  dd             cut the item (with its subtasks and notes)
  D              clear every done item
  yy p P         yank, paste below, paste above (a task carries its block)
  J / K          move the item down / up (a task carries its block; a heading, its section)

= visual
  V              select whole items; j / k extend the selection
                 then d cut, y yank, space cycle; esc cancels

= folding
  za             fold / unfold the section at the cursor (zo open, zc close)
                 headings show (done/total) and a ▸ when collapsed

= other
  / n N          search (highlights as you type, jumps to match), next, previous
  esc            clear the search highlight
  u  ctrl-r      undo, redo
  :help  :?      show the keys in-app (any key closes)
  :w :q :wq :x   write, quit (q refuses if unsaved), write and quit
  :q!            quit, discarding unsaved changes
  :reset         set every item back to todo
  :clear         remove every item
  :reorder       re-sort / regroup the list
  :archive       move done items out to the archive file (~/.todo.archive.txt)
  :theme NAME    switch theme (default, gruvbox, nord, mono, light, custom)
  tab            complete the command (or theme name) in the : line
```

## items

```text
= project          a section        -> I. project
== phase one       a subsection     -> i. phase one
- write the docs   a subtask
* maybe later      an optional task -> ( )
> extra detail     a note on the task above
! pay rent         an important task -> bold !PAY RENT!
buy milk           a plain task
```

within a section, items group as required, then optional, then done, with a blank line between the groups.

## build

```sh
$ sudo make install            # -> /usr/local/bin + man page
$ make install PREFIX=~/.local # or somewhere without sudo
```

it's one file, so if you don't want the makefile:

```sh
$ cc -O2 todo.c -o todo
```

## license

`todo` is licensed under the mit license. see [license](LICENSE) for more.