github saberzero1/motions 0.120.0

latest releases: 1.4.0, 1.3.1, 1.3.0...
one month ago

Fixed

  • Table cell cursor bounce-back on macOS (continued) — the MessageChannel-based scheduleCrossing() from 0.119.0 still raced with Obsidian's table widget focus handlers on macOS Electron. Replaced with requestAnimationFrame, which defers the cross-cell focus change until after the full event dispatch cycle and paint frame complete — guaranteeing Obsidian's table widget keydown handlers have finished before the plugin changes cell focus. (#136)
    • Plugin: src/vim/table-cell-motions.ts (scheduleCrossing now uses requestAnimationFrame instead of MessageChannel)
  • Table-nav viewport does not follow cursor in long tables — when navigating down through a table taller than the viewport with enableTableNav=true, the highlighted cell went off-screen because navigate() only updated the CSS highlight class without scrolling. CM6 treats the native table widget as an opaque block decoration and cannot scroll to positions within it. Fixed by registering an EditorView.scrollHandler facet that intercepts scroll requests during table-nav mode, reads the highlighted cell's DOM bounding rect, and adjusts scrollDOM.scrollTop directly — the CM6-sanctioned mechanism for custom scroll behavior that is not overridden by viewport reconciliation. Added overflow: visible CSS override on the table widget during nav mode to prevent the widget's overflow: auto hidden from blocking scrollIntoView propagation. (#136)
    • Plugin: src/vim/table-nav-controller.ts (syncCursorToActiveCell, tableNavScrollHandler extension)
    • Styles: styles.css (overflow: visible on .vim-motions-table-nav-mode.cm-table-widget)

Added

  • Vim/Neovim built-in gap coverage — systematic effort to close ~50 gaps in vim/neovim built-in command coverage across 8 implementation batches.
  • Fork: @: repeat last ex command — new repeatLastExCommand action replays the most recent ex command. Added to defaultKeymap.
    • Fork: ~/Repos/codemirror-vim/src/vim.js (repeatLastExCommand action + defaultKeymap entry)
  • Fork: & repeat last :s on current line — new repeatLastSubstitute action re-executes the last :s substitution. Added to defaultKeymap.
    • Fork: ~/Repos/codemirror-vim/src/vim.js (repeatLastSubstitute action + defaultKeymap entry)
  • Fork: ZZ write+quit and ZQ quit without saving — mapped in defaultKeymap via exArgs: { input: 'wq' } and exArgs: { input: 'q' } respectively.
    • Fork: ~/Repos/codemirror-vim/src/vim.js (defaultKeymap entries)
  • Fork: Insert <C-a> re-insert previously inserted text — new reinsertPreviousInsert action replays the last insert-mode text at the cursor.
    • Fork: ~/Repos/codemirror-vim/src/vim.js (reinsertPreviousInsert action)
  • Fork: Insert <C-e> copy character from line below — new copySameColumnBelow action copies the character at the same column from the line below.
    • Fork: ~/Repos/codemirror-vim/src/vim.js (copySameColumnBelow action)
  • Fork: Insert <C-y> copy character from line above — new copySameColumnAbove action copies the character at the same column from the line above.
    • Fork: ~/Repos/codemirror-vim/src/vim.js (copySameColumnAbove action)
  • <C-w>w / <C-w>W cycle panes — cycle focus to the next or previous pane in the workspace.
    • Plugin: src/workspace/navigation.ts
  • <C-w>p focus previous pane — jump to the previously accessed pane using leaf ID tracking.
    • Plugin: src/workspace/navigation.ts
    • Plugin: src/main.ts (previousLeafId tracking extracted from Harpoon-gated handler into unconditional handler)
  • gm go to middle of screen line — positions cursor at the horizontal midpoint of the visible editor area.
    • Plugin: src/workspace/navigation.ts
  • go go to character offset — jumps to the Nth byte offset in the buffer (with count prefix).
    • Plugin: src/workspace/navigation.ts
  • g8 show UTF-8 byte sequence — displays the UTF-8 hex byte values for the character under the cursor.
    • Plugin: src/workspace/navigation.ts
  • gF go to file with line number — opens the file path under the cursor, optionally jumping to a line number suffix (e.g., file.md:42).
    • Plugin: src/workspace/navigation.ts
  • <C-g> show file info — displays filename, line count, cursor position, and percentage through file in a notice.
    • Plugin: src/workspace/navigation.ts
  • <C-^> / <C-6> alternate file switching — switch between the current and alternate (previously edited) file, matching Neovim's <C-^> behavior.
    • Plugin: src/main.ts (alternateFilePath / lastMarkdownFilePath fields + <C-^> / <C-6> mapping)
  • <C-]> follow link under cursor — alias for gd (go to definition).
    • Plugin: src/main.ts
  • <C-t> pop from link follow — alias for jump list backward navigation.
    • Plugin: src/main.ts
  • zs / ze / zH / zL horizontal scroll commands — scroll the viewport horizontally without moving the cursor.
    • Plugin: src/workspace/navigation.ts
  • Ex commands for :move, :copy, and :normal — add :m/:move line moves, :t/:copy/:co line copies, and :normal/:normal! key dispatch from the ex line.
    • Plugin: src/workspace/commands.ts (line transfer helpers + :normal key feeding)
  • :tabmove no-op registration — registered as a no-op with a notice (Obsidian has no tab reorder API).
    • Plugin: src/workspace/commands.ts
  • No-op crash guards — 21 commands registered as no-ops to prevent crashes on unrecognized keys: window commands (<C-w>=, <C-w>_, <C-w>|, <C-w>r, <C-w>R, <C-w>x), spelling (]s, [s, z=, zg, zw), normal U, <C-l>, g<C-a>, g<C-x>, insert <C-r>=, <C-k>, <C-v>, <C-x> family.
    • Plugin: src/workspace/navigation.ts

Tests

  • 1 new e2e spec file: test/specs/table-nav-scroll.e2e.ts (viewport scrolling in long tables with constrained scroller height, #136)
  • 1 new fixture file: test-vault/fixtures/table-nav/LongTable.md (30-row table for scroll testing)
  • Updated test/neovim-command-index.yaml — 50 new entries (287→337 total, 313 tested + 21 skip + 3 pending).
  • 5 new e2e spec files:
    • test/specs/vim-builtin/new-commands.e2e.ts (11 tests: @:, &, ZZ, ZQ, insert <C-a>/<C-e>/<C-y>)
    • test/specs/vim-builtin/link-nav-window-cycle.e2e.ts (13 tests: <C-^>, <C-]>, <C-t>, <C-w>w/W/p)
    • test/specs/vim-builtin/ex-move-copy-normal.e2e.ts (19 tests: :m, :t, :normal)
    • test/specs/vim-builtin/minor-motions-scroll.e2e.ts (18 tests: gm, go, g8, gF, <C-g>, zs/ze/zH/zL)
    • test/specs/vim-builtin/noop-commands.e2e.ts (10 tests: all no-op crash guards)

Documentation

  • CHANGELOG.md
  • AGENTS.md: updated fork description with new actions, updated test file organization
  • KNOWN_LIMITATIONS.md: added :m/:t address parsing limitation
  • docs/reference/keybindings.md: added new normal-mode, insert-mode, window, g-prefix, z-prefix, and ex command entries
  • docs/features/ex-commands.md: added :m/:t/:normal editing commands section
  • docs/features/workspace-navigation.md: added pane cycling, alternate file, link navigation, and document info sections
  • CONTRIBUTING.md: updated table-cell-motions.ts and table-nav-controller.ts descriptions
  • KNOWN_LIMITATIONS.md: documented table-nav viewport scrolling fix

Full Changelog: 0.119.0...0.120.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.