github saberzero1/motions 0.21.0

latest releases: 1.4.0, 1.3.1, 1.3.0...
3 months ago

Added

  • Smart list continuation on o/O — pressing o or O on a Markdown list line now automatically continues the list marker on the new line. Supports unordered lists (- , * , + ), ordered lists (1. , 1) ), task lists (- [ ] , - [x] ), ordered task lists (1. [ ] ), custom checkbox states (- [!] , - [?] , - [/] , etc.), indented lists, blockquote lists (> - ), and nested blockquotes (> > - ). Ordered lists increment the number for o (below) and keep the same number for O (above). Checked tasks always continue with an unchecked [ ] . Lines inside fenced code blocks are excluded. Controlled by Settings → Vim Motions → Smart list continuation on o/O (on by default). Disable for plain Neovim behavior.
    • Fork: added getAction(name) API to the vimApi object for action introspection, enabling the save/restore pattern for built-in action overrides
    • Plugin: added defineActionOverride method to VimRegistration that captures the original action before overriding and restores it on plugin unload — ensuring o/O revert to default vim behavior when the plugin is disabled
  • Fork test count: 1690 (up from 1686, 4 new getAction API tests)
  • E2E test suite test/specs/open-line-list.e2e.ts with 35 tests covering all list types, indentation levels, blockquotes, nested blockquotes, code block exclusion, undo, and edge cases

Fixed

  • O on first line after frontmatter behaves like o — pressing O on the first content line below YAML frontmatter inserted the new line into the frontmatter region (swallowed by Obsidian's properties UI) instead of above the current line. Fixed in both the fork and the plugin:
    • Fork: newLineAndEnterInsertMode in vim.js compared insertAt.line === cm.firstLine() — always false when frontmatter is present. Now scans past ----delimited frontmatter to find the first editable line and uses insertAt.line <= firstEditable as the boundary check. The insertion point uses { line: insertAt.line, ch: 0 } instead of hardcoded firstLine(), so it works for all line types (plain text, headings, etc.) with or without frontmatter.
    • Plugin: the smart list continuation override in open-line.ts had the same curLine === cm.firstLine() issue. Added firstEditableLine() helper with the same frontmatter scan, changed the boundary check to curLine <= firstEditableLine(cm), and updated the insertion point to { line: curLine, ch: 0 }.
  • E2E regression tests for o/O with frontmatter: O on unordered/ordered/task list after frontmatter inserts above, o after frontmatter inserts below, O on non-list line after frontmatter inserts above, o on non-list line after frontmatter inserts below, O on second line after frontmatter uses normal insertion path
  • gk on wrapped line after frontmatter jumps straight to properties — when the first line below the frontmatter wraps across multiple display lines, gk now correctly navigates through the wrapped display lines before entering the properties panel. Previously, the stuckAtBoundary check in the fork's findPosV treated display-line movement within a wrapped line as "stuck" (same document line) and immediately fired focusBefore. The check now also verifies that the cursor offset truly didn't change (range.head === startOffset), distinguishing "cursor moved to a higher display line within a wrapped line" from "cursor is truly stuck at the frontmatter boundary." (#25)
  • let mapleader = " " (space) not working as leader key — space as leader now works regardless of which features are enabled. The default <Space> → l binding in codemirror-vim's keymap consumed the space keystroke before leader-prefixed sequences could accumulate. Previously, unmapDefaultBinding(leader) was only called inside registerEasyMotion(), so the fix only applied when EasyMotion was enabled. The plugin now unmaps the leader key's default binding centrally — after vimrc loading, in reregisterLeaderFeatures(), and in reloadFeatures() — so any key used as leader (space, comma, semicolon, etc.) works for all leader-dependent features (table manipulation, hint mode, settings leader bindings) even when EasyMotion is disabled. (#21)
  • Mislabeled "space as leader" e2e test — the describe('space as leader') test block was loading let mapleader = "," instead of let mapleader = " ", making it a duplicate of the comma test rather than a true space leader test. Fixed to use space, providing actual cross-platform regression coverage.
  • E2E regression tests for gk wrapped-line frontmatter edge case: gk navigates display lines on wrapped first content line, gk enters properties on non-wrapping first content line, k enters properties from first content line

Changed

  • Settings tab reorganized — settings are now grouped under section headings for easier navigation: Vim features (text objects, structural navigation, hard-wrap, smart list continuation, table navigation, table widget mode, workspace navigation), Jump navigation (EasyMotion, hint mode, shared label font size), Status bar (mode indicator, chord display, powerline, mode prompts), Cursor shapes, Vimrc & key bindings (vimrc toggle, leader key bindings), Which-key hints (mode, grouping, group labels), Advanced (scrolloff, multi-line scan range). Previously, settings appeared as an undifferentiated list with only a few headings.
  • EasyMotion label characters — now exposed as a dedicated text field in the Jump navigation settings section. Previously only configurable by knowing the default value.

Documentation

  • KNOWN_LIMITATIONS.md: added "Smart list continuation and frontmatter" section documenting the O boundary fix
  • DIFFERENCES.md (fork): added "Frontmatter-aware O (open line above)" section documenting the newLineAndEnterInsertMode fix
  • README.md: updated smart list continuation description to mention frontmatter awareness
  • README.md: updated settings list to reflect new section grouping and ordering
  • KNOWN_LIMITATIONS.md: updated "Properties navigation" section with wrapped-line stuckAtBoundary edge case fix
  • DIFFERENCES.md (fork): updated "Properties navigation" section with range.head === startOffset guard

Full Changelog: 0.20.0...0.21.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.