Added
- Neovim default mapping audit — comprehensive audit of all Neovim default mappings against the plugin implementation, with 20+ mappings added or fixed. Full results documented in
NEOVIM_MAPPING_DIFFERENCES.md. gMmotion — go to middle character of the text line (by character count). Distinct fromgm(middle of screen line).- Fork:
~/Repos/codemirror-vim/src/vim.js(newmoveToMiddleOfTextLinemotion + defaultKeymap entry)
- Fork:
g&action — repeat last:ssubstitution on all lines in the buffer (equivalent to:%s//~/&).- Fork:
~/Repos/codemirror-vim/src/vim.js(newrepeatLastSubstituteGlobalaction + defaultKeymap entry)
- Fork:
]<Space>/[<Space>actions — add N blank lines below/above cursor. Supports count prefix (3]<Space>adds 3 blank lines). Neovim default since 0.10.- Plugin:
src/workspace/navigation.ts(addBlankLineBelow/addBlankLineAboveactions)
- Plugin:
<C-W>Taction — move current pane to a new tab. Transfers the leaf's view state to a new tab leaf, then detaches the old leaf.- Plugin:
src/workspace/navigation.ts(moveToNewTabaction)
- Plugin:
<C-W>^action — split current window and edit the alternate file. Combines horizontal split + alternate file navigation.- Plugin:
src/workspace/navigation.ts(splitAlternateFileaction)
- Plugin:
<C-W>nmapping — alias for<C-W>s(new horizontal split). Matches Neovim's:newequivalent.- Plugin:
src/workspace/navigation.ts(additionalmapCommandcall)
- Plugin:
g<Tab>mapping — go to last accessed tab page. Aliases the existingfocusPreviousPaneaction.- Plugin:
src/workspace/navigation.ts(additionalmapCommandcall)
- Plugin:
]f/[fmappings — alias forgf(go to file). Matches Neovim bracket file navigation.- Plugin:
src/workspace/navigation.ts(additionalmapCommandcalls)
- Plugin:
v_*/v_#visual search — in visual mode,*and#search for the selected text instead of the word under cursor. Neovim default since 0.10.- Fork:
~/Repos/codemirror-vim/src/vim.js(newselectedTextquerySrc + visual-context keymap entries)
- Fork:
Kkeyword lookup — adapted for Obsidian: triggers hover page preview on wikilinks, opens external URLs in browser, falls back togacharacter info on plain text.- Plugin:
src/workspace/navigation.ts(createKeywordLookupAction)
- Plugin:
g<C-A>/g<C-X>sequential increment — in visual mode, increments/decrements numbers sequentially across selected lines (+1, +2, +3...). Useful for numbered lists: select0\n0\n0, pressg<C-A>→1\n2\n3.- Fork:
~/Repos/codemirror-vim/src/vim.js(sequential path inincrementNumberToken) - Fork:
~/Repos/codemirror-vim/src/types.ts(sequentialadded toActionArgsPartial)
- Fork:
:center/:left/:rightex commands — text alignment.:cecenters lines,:leleft-aligns (trims),:riright-aligns. Optional width argument (default:textwidthor 80).- Plugin:
src/workspace/commands.ts(createAlignCommand)
- Plugin:
:retabex command — replaces all tab characters with spaces using the currenttabSize(or an explicit argument).- Plugin:
src/workspace/commands.ts
- Plugin:
]m/[m/]M/[Mmethod navigation — verified working via the fork's genericmoveToSymbolmotion withmethodmode. Golden test definitions added.
Fixed
<C-U>in insert mode deleted to start of line instead of insert-start position — fork now tracks_insertStartPos(the cursor position when insert mode was entered).<C-U>deletes back to that position instead of line start. Falls back to line start when cursor is already at or before the insert-start position. Position is preserved across<C-O>single normal commands, matching Neovim behavior.- Fork:
~/Repos/codemirror-vim/src/vim.js(newmoveToInsertStartmotion,_insertStartPostracking inenterInsertMode/exitInsertMode) - Fork:
~/Repos/codemirror-vim/src/types.ts(_insertStartPosadded tovimState)
- Fork:
:d3/:m0style ex commands didn't work — the ex command parser treated trailing digits as part of the command name (e.g.,d3→ unknown commandd3). FixedmatchCommand_to have a fallback pass matching commands by progressively shorter alpha prefixes, and_processCommandto extract the trailing suffix into arguments. Also fixes:g/pattern/m0subcommand routing.- Fork:
~/Repos/codemirror-vim/src/vim.js(matchCommand_fallback pass,_processCommandarg extraction)
- Fork:
:$dcursor position differed from Neovim — after deleting lines with:d, cursor is now positioned at the first non-blank ofmin(startLine, lastLine()), matching Neovim.- Fork:
~/Repos/codemirror-vim/src/vim.js(exCommands.deletecursor positioning)
- Fork:
:move/:mand:copy/:co/:tdeviations were stale — the plugin already implements these viacreateMoveCopyCommandinsrc/workspace/commands.ts, overriding the fork's cursor-only stub. Deviation entries indeviations.tsshould be removed.
Tests
- 3 new golden test definitions for
gM(middle of text line, short line, second line) - 1 new golden test definition for
g&(repeat substitute on all lines) - 2 new golden test definitions for
]m/[m(method start forward/backward) - 3 new manual tests for
]<Space>/[<Space>(add blank line below, above, with count) - 2 new manual tests for
gM(middle of 10-char line, 3-char line) - 1 new manual test for
g&(repeat substitute on all lines) - 2 new manual tests for
v_*/v_#(visual search forward/backward) - 1 new manual test for
<C-U>insert-start (preserves prefix text) - Golden data re-recorded for g-commands suite
Documentation
CHANGELOG.mdNEOVIM_MAPPING_DIFFERENCES.md(new file — full audit document, updated after each round)- Fork:
~/Repos/codemirror-vim/DIFFERENCES.md(addedgM,g&,:d count,<C-U>insert-start,v_*/v_#, ex command name parsing,:$dcursor,g<C-A>/g<C-X>) docs/reference/keybindings.md(added new keybindings)docs/features/ex-commands.md(added alignment and retab commands)docs/features/quality-of-life.md(added new Neovim defaults)
Full Changelog: 0.126.0...0.127.0