diff --git a/README.md b/README.md index 04596d5..19392e7 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ require('nuwiki').setup({ enabled = true, wiki_prefix = true, -- w* links = true, -- , , , , +, … - lists = true, -- , gln/glp/glx, gl, o/O, … + lists = true, -- , gln/glp/glx, gl/gL, o/O, … headers = true, -- =, -, ]], [[, ]=, [=, ]u, [u table_editing = true, -- gqq, , , in insert mode diary = true, -- , @@ -285,7 +285,7 @@ Each is a boolean. All default to `true` except `mouse`. | `enabled` | `true` | master switch for the whole keymap layer | | `wiki_prefix` | `true` | `w*` | | `links` | `true` | ``, ``, ``, ``, `+`, … | -| `lists` | `true` | ``, `gln`/`glp`/`glx`, `gl`, `o`/`O`, … | +| `lists` | `true` | ``, `gln`/`glp`/`glx`, `gl`/`gL`, `o`/`O`, … | | `headers` | `true` | `=`, `-`, `]]`, `[[`, `]=`, `[=`, `]u`, `[u` | | `table_editing` | `true` | `gqq`, ``, ``, `` (insert) | | `diary` | `true` | ``, `` | @@ -417,7 +417,7 @@ available on both the Neovim and plain-Vim paths. | `:NuwikiIncrementListItem` / `:NuwikiDecrementListItem` | `:VimwikiIncrementListItem` / `:VimwikiDecrementListItem` | Cycle the list marker to the next / previous symbol | | `:NuwikiChangeSymbol {sym}` | `:VimwikiChangeSymbolTo {sym}` (`:VimwikiListChangeSymbolI`) | Set the current item's marker to `{sym}` | | `:NuwikiChangeSymbolInList {sym}` | `:VimwikiChangeSymbolInListTo {sym}` | Set every item in the list to `{sym}` | -| `:NuwikiRemoveDone` | `:VimwikiRemoveDone` | Remove every completed item from the current list | +| `:NuwikiRemoveDone[!]` | `:VimwikiRemoveDone[!]` | Remove every completed item from the current list; with `!`, from the whole buffer | | `:NuwikiRemoveCheckbox` | `:VimwikiRemoveSingleCB` | Strip the checkbox from the current list item | | `:NuwikiRemoveCheckboxInList` | `:VimwikiRemoveCBInList` | Strip the checkbox from every item in the current list | | `:NuwikiListChangeLvl {increase\|decrease}` | `:VimwikiListChangeLvl {increase\|decrease}` | Indent / dedent the current list item | @@ -484,10 +484,15 @@ via `mappings. = false` in Neovim, or | `gLr` | Renumber every ordered list in the buffer | | `gl` | Set the current item's marker to `` — one of `-` `*` `#` `1` (`1.`) `i` (`i)`) `I` (`I)`) `a` (`a)`) `A` (`A)`) | | `gL` | Set every item in the list to `` (same symbol keys) | -| `gl` | Remove every completed item from the current list | -| `gL` | Remove every completed item in the buffer | +| `gl` | Remove the checkbox from the current item, keeping its text | +| `gL` | Remove the checkbox from every item in the current list | | `o` / `O` | Open a new line and continue the list marker (preserves any checkbox) | +Bare `gl` / `gL` share the `gl…` prefix with the maps above, so (like upstream +vimwiki) they fire only after `'timeoutlen'`; type a suffix such as `gln` or +`gl*` quickly to reach the prefixed maps. Removing *done* items is command-only: +`:NuwikiRemoveDone` (current list) / `:NuwikiRemoveDone!` (whole buffer). + **Lists** (insert mode) | Key | Action | diff --git a/development/vimwiki-gap.md b/development/vimwiki-gap.md index 4196bd3..b63f6da 100644 --- a/development/vimwiki-gap.md +++ b/development/vimwiki-gap.md @@ -31,11 +31,16 @@ fix site. lists block, wired to the existing `list_change_symbol`. `1)` stays command-only (upstream shadows it with `1.`); normal-mode only (server acts on cursor item / whole list, not a visual range). -- [ ] **`gl` / `gL` semantics diverge** — upstream = *remove - checkbox* from item / list siblings; nuwiki rebinds to *remove done items*. - Same keys, different effect (parity trap). Remove-checkbox is command-only in - nuwiki (`:NuwikiRemoveCheckbox` / `…InList`). - _Fix:_ `lua/nuwiki/keymaps.lua`, `ftplugin/vimwiki.vim`. +- [x] **`gl` / `gL` semantics diverge** — upstream = *remove + checkbox* from item / list siblings; nuwiki rebound to *remove done items*. + Same keys, different effect (parity trap). + _Fix:_ bound **bare `gl`/`gL`** to remove-checkbox-item / -in-list for exact + upstream parity (`lua/nuwiki/keymaps.lua` lists block, `ftplugin/vimwiki.vim` + Vim-branch lists block); they share the `gl…` prefix so they fire after + `timeoutlen`, just like upstream. Remove-*done* is now command-only: + `:NuwikiRemoveDone` (current list) gained a `-bang` so `:NuwikiRemoveDone!` + reaches the whole-buffer sweep that `gL` previously held (the only + prior entry point). Normal-mode only. ## P2 — Moderate (real users hit these) diff --git a/doc/nuwiki.txt b/doc/nuwiki.txt index f55ca6d..d965c49 100644 --- a/doc/nuwiki.txt +++ b/doc/nuwiki.txt @@ -456,8 +456,13 @@ Lists (normal mode) ~ of `-` `*` `#` `1` (1.) `i` (i)) `I` (I)) `a` (a)) `A` (A)). For `1)` use `:NuwikiChangeSymbol 1)` (no single-key form). gL Set every item in the list to (same symbol keys). - gl Remove every completed item from the current list. - gL Remove every completed item in the buffer. + gl Remove the checkbox from the current item, keeping its text. + gL Remove the checkbox from every item in the current list. + Bare `gl`/`gL` share the `gl...` prefix above, so (like + upstream vimwiki) they fire only after 'timeoutlen'; type a + suffix such as `gln`/`gl*` quickly to reach the prefixed maps. + Removing done items is command-only: `:NuwikiRemoveDone` + (current list) / `:NuwikiRemoveDone!` (whole buffer). o Open a new line and continue the list marker (preserves any checkbox). O Same, opening above the current line.