fix(client): P2 diary tab collision + <M-CR> badd-link parity
CI / cargo fmt --check (push) Successful in 36s
CI / cargo clippy (push) Successful in 40s
CI / cargo test (push) Successful in 32s
CI / editor keymaps (push) Successful in 1m35s

Two upstream-parity keymap fixes (confirmed against upstream
ftplugin/vimwiki.vim):

1. <Leader>w<Leader>t collision — nuwiki bound both <Leader>w<Leader>t and
   <Leader>w<Leader>m to tomorrow's diary. Upstream: <Leader>w<Leader>t opens
   today's diary in a NEW TAB, <Leader>w<Leader>m opens tomorrow. <Leader>w
   <Leader>t now calls diary_today_tab; <Leader>w<Leader>m stays tomorrow.

2. <M-CR> badd-link — adding a link target to the buffer list was mouse-only
   (<MiddleMouse>) / command-only (:VimwikiBaddLink). Upstream binds
   <M-CR> -> VimwikiBaddLink. Added normal-mode <M-CR> -> badd_link to the
   links group of both clients.

Both clients (lua/nuwiki/keymaps.lua, ftplugin/vimwiki.vim); README + doc/
nuwiki.txt updated. Tests: map[n].<M-CR> in both harnesses;
diary.leader_t_opens_today_in_tab / diary.leader_m_opens_tomorrow (vim).
nvim 270, vim 263+18, all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 16:21:49 +00:00
parent 9de8543385
commit 086455e19b
7 changed files with 38 additions and 9 deletions
+3 -1
View File
@@ -433,6 +433,7 @@ Links (normal mode) ~
<C-CR> Follow in a vertical split.
<C-S-CR> Follow in a tab, reusing an existing tab if the file is
already open.
<M-CR> Add the link target to the buffer list (`:badd`, no jump).
<BS> Jump back (`<C-o>`).
<Tab> Next wikilink on or after the cursor.
<S-Tab> Previous wikilink.
@@ -491,7 +492,8 @@ Wiki / diary / export ~
<Leader>wi Open the diary index.
<Leader>w<Leader>w Today.
<Leader>w<Leader>y Yesterday.
<Leader>w<Leader>t Tomorrow.
<Leader>w<Leader>t Today, in a new tab.
<Leader>w<Leader>m Tomorrow.
<Leader>w<Leader>i Rebuild the diary index page.
<Leader>wn Goto page (prompts for name).
<Leader>wd Delete the current page.