feat(init): multi-level priority with <C-a>/<C-x>
Problem: priority was binary (0 or 1), toggled with !, with no way to express finer gradations or use Vim's native increment idiom. Solution: replace toggle_priority with change_priority(delta) which clamps to floor 0. Display format changes from '! ' to '[N] ' so any integer level is representable. Parser updated to extract numeric level from the [N] prefix. Visual g<C-a>/g<C-x> apply the delta to all tasks in the selection. <Plug>(pending-priority) replaced with <Plug>(pending-priority-up) and <Plug>(pending-priority-down).
This commit is contained in:
parent
aae6989a19
commit
fc4a47a1ec
5 changed files with 60 additions and 13 deletions
|
|
@ -30,8 +30,12 @@ vim.keymap.set('n', '<Plug>(pending-view)', function()
|
|||
require('pending.buffer').toggle_view()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-priority)', function()
|
||||
require('pending').toggle_priority()
|
||||
vim.keymap.set('n', '<Plug>(pending-priority-up)', function()
|
||||
require('pending').change_priority(1)
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-priority-down)', function()
|
||||
require('pending').change_priority(-1)
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-date)', function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue