parity(6): insert-mode <Tab>/<S-Tab> table cell nav

`<Tab>` / `<S-Tab>` in insert mode navigate between table cells when
the cursor is on a `|…|` row, otherwise they pass through to their
default insert-mode behaviour (literal tab / shift-tab). Same
`<expr>`-mapping idiom as Cluster 5's smart_return.

  <Tab>    next cell; creates a fresh row below if past the last cell
  <S-Tab>  previous cell; no-op past the first

Cursor lands immediately after the destination cell's leading `|`,
matching upstream vimwiki's `vimwiki#tbl#go_*_cell` behaviour.

Both Lua and VimL counterparts wired into ftplugin's existing
table_editing block (gated alongside `gqq`/`<A-Left>`).

Tests: 4 new in scripts/test-keymaps.lua — next cell, new-row
overflow, previous cell, and pass-through outside a table.

Gates: 421 Rust / 39 Neovim / 12 Vim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-12 21:37:53 +00:00
parent e347f605ff
commit 2562a046db
5 changed files with 172 additions and 0 deletions
+2
View File
@@ -176,6 +176,8 @@ if !has('nvim')
inoremap <silent><buffer> <C-L><C-K> <C-o>:call nuwiki#commands#list_cycle_symbol(-1)<CR>
inoremap <silent><buffer> <C-L><C-M> <C-o>:call nuwiki#commands#list_toggle_or_add_checkbox()<CR>
inoremap <silent><buffer><expr> <CR> nuwiki#commands#smart_return()
inoremap <silent><buffer><expr> <Tab> nuwiki#commands#smart_tab()
inoremap <silent><buffer><expr> <S-Tab> nuwiki#commands#smart_shift_tab()
" Headers
nnoremap <silent><buffer> = :call nuwiki#commands#heading_add()<CR>