feat: add <C-a> / <C-x> keymaps for priority increment/decrement
Problem: Priority could only be cycled with `g!` (0→1→2→3→0), with no way to directly increment or decrement. Solution: Add `adjust_priority()` with clamping at 0 and `max_priority`, exposed as `increment_priority()` / `decrement_priority()` on `<C-a>` / `<C-x>`. Includes `<Plug>` mappings and vimdoc.
This commit is contained in:
parent
cfcaaca28b
commit
ec1d4c6092
4 changed files with 78 additions and 0 deletions
|
|
@ -299,6 +299,8 @@ Default buffer-local keys: ~
|
|||
`gz` Undo the last `:w` save (`undo`)
|
||||
`o` Insert a new task line below (`open_line`)
|
||||
`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`)
|
||||
`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`)
|
||||
|
|
@ -413,6 +415,16 @@ old keys to `false`: >lua
|
|||
Toggle blocked status for the task under the cursor.
|
||||
If the task is already `blocked`, reverts to `pending`.
|
||||
|
||||
*<Plug>(pending-priority-up)*
|
||||
<Plug>(pending-priority-up)
|
||||
Increment the priority level for the task under the cursor, clamped
|
||||
at `max_priority`. Default key: `<C-a>`.
|
||||
|
||||
*<Plug>(pending-priority-down)*
|
||||
<Plug>(pending-priority-down)
|
||||
Decrement the priority level for the task under the cursor, clamped
|
||||
at 0. Default key: `<C-x>`.
|
||||
|
||||
*<Plug>(pending-open-line)*
|
||||
<Plug>(pending-open-line)
|
||||
Insert a correctly-formatted blank task line below the cursor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue