feat(client): bind bare gl/gL to remove-checkbox for vimwiki parity

Upstream vimwiki binds bare gl/gL to remove-checkbox (item / whole list);
nuwiki had rebound the conceptual keys to gl<Space>/gL<Space> as remove-done,
a same-keys-different-effect parity trap. Bind bare gl/gL to remove-checkbox
instead — they share the gl… prefix so they fire after 'timeoutlen', exactly
as upstream. Remove-done becomes command-only; add -bang to *RemoveDone so
:NuwikiRemoveDone! reaches the whole-buffer sweep that gL<Space> previously
held (its only entry point).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 08:41:22 -03:00
parent a53ba167d6
commit a15ae184a0
2 changed files with 18 additions and 10 deletions
+8 -4
View File
@@ -231,10 +231,14 @@ function M.attach(bufnr, mappings)
map('n', 'gL' .. key, function() cmd.list_change_symbol(sym, true) end,
{ desc = 'nuwiki: set list markers to ' .. sym }, bufnr)
end
map('n', 'gl<Space>', cmd.list_remove_done,
{ desc = 'nuwiki: remove done items (current list)' }, bufnr)
map('n', 'gL<Space>', cmd.list_remove_done_all,
{ desc = 'nuwiki: remove done items (whole doc)' }, bufnr)
-- Bare gl/gL: remove the checkbox marker, keep the item text (upstream
-- VimwikiRemoveSingleCB / RemoveCBInList). They share the `gl…` prefix
-- with the maps above, so they fire after `timeoutlen` — exactly as
-- upstream. Remove-done is command-only (`:NuwikiRemoveDone[!]`).
map('n', 'gl', cmd.list_remove_checkbox,
{ desc = 'nuwiki: remove checkbox (current item)' }, bufnr)
map('n', 'gL', cmd.list_remove_checkbox_in_list,
{ desc = 'nuwiki: remove checkboxes (whole list)' }, bufnr)
map('n', 'o', open_below_with_bullet, { desc = 'nuwiki: open below + bullet' }, bufnr)
map('n', 'O', open_above_with_bullet, { desc = 'nuwiki: open above + bullet' }, bufnr)