feat(priority): add g<C-a> and g<C-x> visual batch priority mappings (#151)

Problem: Incrementing or decrementing priority required operating on one
task at a time with `<C-a>`/`<C-x>`, which is tedious when adjusting
multiple tasks.

Solution: Add `adjust_priority_visual(delta)` that iterates the visual
selection range, updates every task line's priority in one pass, then
re-renders once. Exposed as `increment_priority_visual()` /
`decrement_priority_visual()` with `g<C-a>` / `g<C-x>` defaults, new
`<Plug>` mappings, and config keys `priority_up_visual` /
`priority_down_visual`.
This commit is contained in:
Barrett Ruth 2026-03-12 20:19:08 -04:00 committed by Barrett Ruth
parent 077e4121b4
commit ae44beb32d
4 changed files with 83 additions and 0 deletions

View file

@ -354,6 +354,8 @@ Default buffer-local keys: ~
`O` Insert a new task line above (`open_line_above`)
`<C-a>` Increment priority (clamped at `max_priority`) (`priority_up`)
`<C-x>` Decrement priority (clamped at 0) (`priority_down`)
`g<C-a>` Increment priority for visual selection (`priority_up_visual`)
`g<C-x>` Decrement priority for visual selection (`priority_down_visual`)
`J` Move task down within its category (`move_down`)
`K` Move task up within its category (`move_up`)
`zc` Fold the current category section (requires `folding`)