feat(parity): close the entire P3 Mappings section

Both remaining mapping gaps (client-side, both clients):

- Visual <CR>: upstream binds it to NormalizeLinkVisualCR (== visual `+`).
  Added `x <CR>` -> normalize_link(true) (wrap the selection as a wikilink)
  in both clients.

- Insert <S-CR>: upstream's multiline-list-item continuation (VimwikiReturn
  2 2 -> kbd_cr with no new marker). New smart_shift_return (both clients,
  <expr> insert mapping): on a list item returns <CR> + spaces aligning under
  the item text (marker width + 1, +4 for a `[ ] ` checkbox), no marker; off a
  list item, a plain <CR>. Mirrors smart_return's auto-indent handling.

Tests: map.visual_cr_wraps_selection + map.insert_shift_cr_multiline
(test-keymaps.lua, the latter exercising the handler directly since <S-CR>
doesn't round-trip headless feedkeys), and map.visual_cr_wraps_selection +
cr.shift_cr_multiline{,_checkbox} (test-keymaps-vim.vim). Docs (README +
doc/nuwiki.txt) and the gap doc updated. Neovim 305, Vim 299/18/21 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 11:04:56 +00:00
parent 305324c6e9
commit 724712121d
9 changed files with 146 additions and 7 deletions
+6 -1
View File
@@ -275,6 +275,7 @@ Vim-specific globals ~
`<Leader>w<Leader>m`, `<Leader>w<Leader>i`
`links` `<CR>`, `<S-CR>`, `<C-CR>`, `<C-S-CR>`, `<D-CR>`,
`<M-CR>`, `<BS>`, `<Tab>`, `<S-Tab>`, `+` (n/x),
`<CR>` (x: normalize selection),
`<Leader>wn`, `<Leader>wd`, `<Leader>wr`,
`<Leader>wc` (n/x)
`lists` `<C-Space>` (also `<C-@>`/`<Nul>`), `gnt`, `gln`,
@@ -283,7 +284,7 @@ Vim-specific globals ~
`gla`, `glA`, `gL-`, `gL*`, `gL#`, `gL1`, `gLi`,
`gLI`, `gLa`, `gLA`, `gl`, `gL`, `o`, `O`; insert
`<C-D>`, `<C-T>`, `<C-L><C-J>`, `<C-L><C-K>`,
`<C-L><C-M>`, `<CR>`
`<C-L><C-M>`, `<CR>`, `<S-CR>`
`headers` `=`, `-`, `]]`, `[[`, `]=`, `[=`, `]u`, `[u`
`table_editing` `gqq`, `gq1`, `gww`, `gw1`, `<A-Left>`,
`<A-Right>`; insert `<Tab>`, `<S-Tab>`
@@ -747,6 +748,10 @@ on context:
same column count; cursor lands inside the first cell.
* Otherwise — plain `<CR>`.
Insert `<S-CR>` continues a list item as a *multiline* item: a new line
with no marker, indented to align under the item's text (or a plain
`<CR>` when not on a list item). Mirrors vimwiki's `<S-CR>`.
Table cell navigation ~
<Tab> Jump to the next cell. Past the last cell, insert a fresh