0.65.0
Fixed
- Block cursor displays wrong character after editor refocus in Live Preview — when the editor lost and regained focus (e.g., opening/closing DevTools), Obsidian's Live Preview re-expanded hidden markdown formatting (like
##in headings) after focus returned. The block cursor'srequestMeasureran in the same frame as the decoration change, before the browser reflowed the new DOM — causingcoordsAtPos()to read stale layout coordinates and the cursor to display the wrong character. Fixed in the codemirror-vim fork by addingfocusChangedto the block cursor's redraw trigger and scheduling a deferredrequestAnimationFramere-measure on focus gain, ensuring the cursor reads post-reflow coordinates. (#71)- Fork:
~/Repos/codemirror-vim/src/block-cursor.ts(focusChangedtrigger, deferredrequestAnimationFramere-measure),~/Repos/codemirror-vim/src/index.ts(focus event handler oncontentDOM)
- Fork:
Added
- Replace-with-register operator (
gr{motion}) — implements thegroperator from vim-ReplaceWithRegister.gr{motion}replaces the text covered by {motion} with register contents, discarding the replaced text (register preserved). Supportsgrr(linewise),"xgr{motion}(named registers),{Visual}gr(visual charwise and linewise),[count]grr, and dot-repeat. Blockwise visual mode is a documented no-op for v1. (#72)- Plugin:
src/operators/replace-with-register.ts(new: operator implementation),src/operators/register.ts(new:registerReplaceWithRegister()export),src/main.ts(independent gating viaenableReplaceWithRegister),src/workspace/navigation.ts(conditionalgrn/grr/gra→<leader>rn/<leader>rb/<leader>rarelocation),src/settings.ts(enableReplaceWithRegistersetting in both UI versions),src/vimrc/loader.ts(replacewithregister/rwroptions),src/types/vim-api.d.ts(getRegister()type)
- Plugin:
enableReplaceWithRegistersetting — boolean toggle (default:true) gating thegroperator independently fromenableHardWrap. When enabled,grn/grr/graworkspace bindings are relocated to<leader>rn/<leader>rb/<leader>raunder a "Notes" which-key group. When disabled, legacygrn/grr/grabindings are restored. Configurable via Settings UI (both pre-1.13 and post-1.13),:set replacewithregister/:set rwrin vimrc, orvim.opt.replacewithregisterin Lua.
Tests
- 22 e2e tests in
test/specs/operators.e2e.tsfor replace-with-register:grr(single, multi-line, count),griw,gr$,grl,gri',gr}, named registers ("agriw,"a3grr), visualgr(charwise and linewiseV), register type coercion (linewise↔charwise), cursor positioning, dot-repeat (griw,grr,3grr+.), multi-line register expansion, text object at line boundary. 4 skipped blockwise visual mode tests documenting expected behavior for future implementation.
Documentation
CHANGELOG.md: Added replace-with-register operator entry; added block cursor refocus fix entryKNOWN_LIMITATIONS.md: Updatedgrreplace-with-register parity section — removed[count]grrand dot-repeat gaps (confirmed working), updated test coverage line; added block cursor refocus → FixedREADME.md: Added replace-with-register to features listCONTRIBUTING.md: Addedreplace-with-register.tsto codebase structure, updated workspace navigation descriptionAGENTS.md: Updated workspace navigation descriptiondocs/reference/keybindings.md: Added replace-with-register section, updated workspace nav with<leader>r*bindingsdocs/features/workspace-navigation.md: Updated migration note with new<leader>r*defaultsdocs/features/ex-commands.md: Updated default-key column for relocated commandsdocs/configuration/settings.md: AddedenableReplaceWithRegisterto Vim features groupdocs/configuration/vimrc.md: Addedreplacewithregister/rwrto boolean optionsdocs/configuration/lua-config.md: Addedreplacewithregisterto vim.opt table
Full Changelog: 0.64.0...0.65.0