docs: update default keymaps to g-prefixed keys (#101)

Problem: Default buffer-local keys `!`, `D`, `F`, `U` shadow common Vim
builtins (`!` filter, `D` delete-to-eol, `F` reverse-find, `U` line-undo).

Solution: Document new defaults `g!`, `gd`, `gf`, `gz` in the mappings
table, config example, and command references. Add a deprecated-keys
section listing the old-to-new mapping with removal timeline.
This commit is contained in:
Barrett Ruth 2026-03-08 19:03:39 -04:00
parent c9471ebe90
commit 69ca0147d8

View file

@ -238,7 +238,7 @@ COMMANDS *pending-commands*
*:Pending-undo*
:Pending undo
Undo the last `:w` save, restoring the task store to its previous state.
Equivalent to the `U` buffer-local key (see |pending-mappings|). Up to 20
Equivalent to the `gz` buffer-local key (see |pending-mappings|). Up to 20
levels of undo are persisted across sessions.
*:Pending-init*
@ -267,11 +267,11 @@ Default buffer-local keys: ~
------- ------------------------------------------------
`q` Close the task buffer (`close`)
`<CR>` Toggle complete / uncomplete (`toggle`)
`!` Toggle the priority flag (`priority`)
`D` Prompt for a due date (`date`)
`F` Prompt for filter predicates (`filter`)
`g!` Toggle the priority flag (`priority`)
`gd` Prompt for a due date (`date`)
`gf` Prompt for filter predicates (`filter`)
`<Tab>` Switch between category / queue view (`view`)
`U` Undo the last `:w` save (`undo`)
`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`)
`zc` Fold the current category section (requires `folding`)
@ -307,6 +307,23 @@ All motions support count: `3]]` jumps three headers forward. `]]` and
`dd`, `p`, `P`, and `:w` work as standard Vim operations.
Deprecated keys: ~ *pending-deprecated-keys*
The following keys were renamed to avoid shadowing Vim builtins. The old
keys still work but emit a deprecation warning and will be removed in a
future release:
Old New Action ~
------- ------- ------------------------------------------------
`!` `g!` Toggle the priority flag
`D` `gd` Prompt for a due date
`F` `gf` Prompt for filter predicates
`U` `gz` Undo the last `:w` save
To silence warnings, set the new keys explicitly in your config or set the
old keys to `false`: >lua
vim.g.pending = { keymaps = { priority = 'g!' } }
<
*<Plug>(pending-open)*
<Plug>(pending-open)
Open the task buffer. Maps to |:Pending| with no arguments.
@ -601,10 +618,10 @@ loads: >lua
close = 'q',
toggle = '<CR>',
view = '<Tab>',
priority = '!',
date = 'D',
undo = 'U',
filter = 'F',
priority = 'g!',
date = 'gd',
undo = 'gz',
filter = 'gf',
open_line = 'o',
open_line_above = 'O',
a_task = 'at',