Skip to content

0.67.0

Choose a tag to compare

@github-actions github-actions released this 18 Jul 23:11
· 317 commits to master since this release
0.67.0
ba02bf2

Added

  • Flash motions — enhanced f/F/t/T with labels — when pressing f{char} and 2+ matches exist in the viewport, jump labels appear on all matches. Single match auto-jumps (stock Vim behavior preserved). Works with operators (df{char}{label}, cf, yf), visual mode (vf{char}{label}), and ;/, repeat. Multi-line search enabled by default (configurable via set flashmultiline). Inspired by flash.nvim.
    • Plugin: src/flash/char-mode.ts (core motion override), src/flash/register.ts (registration with original capture), src/flash/labeler.ts (distance-based label assignment with reuse + conflict skip), src/flash/state.ts (active flag, clever-f state)
  • Flash jump mode (s) — bidirectional character jump bound to a configurable key (default: s). Press s{char} to search both directions with labels. Disabled by default (set flashjump to enable). Normal mode only — visual s retains c mapping.
    • Plugin: src/flash/jump-mode.ts
  • Flash clever-f — when enabled (set flashcleverf), pressing f{same-char} after a flash jump falls through to stock f behavior (acts as ;). Uses a 5-second timeout window.
    • Plugin: src/flash/char-mode.ts (clever-f check), src/flash/state.ts (last search tracking)
  • Search match counter — hlslens-style [3/15] indicator in the status bar showing the current match index and total count after / search and n/N navigation. Hides when cursor moves off a match or mode changes from normal. General feature, not flash-specific.
    • Plugin: src/vim/search-counter.ts (new), src/vim/mode-tracker.ts (status bar integration)
  • Incremental jump search — jump mode (s) now accepts multiple characters incrementally. Each keystroke narrows the match set; labels update in real-time with stable assignment via FlashLabeler. Supports Backspace (remove last char, widen matches), Enter (jump to nearest), and autojump on single match. Operator-pending (ds{pattern}{label}) and visual mode supported.
    • Plugin: src/flash/jump-mode.ts (rewritten), src/easymotion/targets.ts (findSubstringTargets)
  • Label conflict skipping — labels that match the next character after a match position are excluded from the label pool, preventing ambiguity when the user might type that character to narrow the search.
    • Plugin: src/flash/jump-mode.ts (computeSkipChars)
  • flashMinPatternLength setting — configurable minimum characters before labels appear in jump mode (default: 1). Below the threshold, matches are highlighted without labels.
    • Plugin: src/settings.ts, src/vim/options.ts, src/vimrc/loader.ts
  • Match highlighting without labelsshowMatchHighlights() renders subtle position indicators for matches below the minPatternLength threshold, distinct from label overlays.
    • Plugin: src/easymotion/overlay.ts (showMatchHighlights), styles.css (.vim-motions-flash-match)
  • Flash search mode — after committing a / or ? search with Enter, labels appear on all visible matches. Press a label key to jump directly; any non-label key clears labels. Configurable via set flashsearch / set noflashsearch.
    • Plugin: src/flash/search-mode.ts (new), src/main.ts (registration with cleanup)
  • codemirror-vim fork API additionsgetMotion(name) retrieves a motion function by name (for capturing originals before override). recordLastCharacterSearch(increment, args) sets the ;/, repeat state from plugin code.
    • Fork: ~/Repos/codemirror-vim/src/vim.js

Changed

  • Flash labelerFlashLabeler class with distance-based assignment (closest targets get home-row labels), label reuse across narrowing (labels stay stable as match set shrinks), and conflict skipping via skipChars set.
  • EasyMotion dimming description — updated to "Dim non-target text when EasyMotion or flash is active" since both features share the dimming overlay.
  • Textarea vim overlay Escape no longer closes parent modal — pressing Escape in normal mode within the textarea overlay now tears down the overlay and returns focus to the original textarea, but no longer re-dispatches a synthetic Escape keydown to the parent UI. Previously, the second Escape closed the host modal (e.g., Spaced Repetition's edit flashcard dialog), which could cause data loss if the user hadn't clicked Save. The new behavior follows a symmetric context stack: modal → vim overlay → modal → user closes modal manually. (#69)
    • Plugin: src/vim/textarea-vim-manager.ts (removed synthetic Escape dispatch from handleEscapeAndRedispatch)

Tests

  • 1 new e2e test in test/specs/textarea-vim.e2e.ts: Escape from normal mode returns to textarea without closing modal — verifies overlay removed, modal still present, textarea restored, content synced
  • 6 spike tests in test/specs/spikes/spike-flash-override.e2e.ts: defineMotion override, async motion, operator-pending, getMotion, recordLastCharacterSearch
  • 17 baseline tests in test/specs/flash-baseline.e2e.ts: stock f/F/t/T with flash disabled (regression guards)
  • 9 e2e tests in test/specs/flash-char-mode.e2e.ts: autojump, multi-match labels, escape cancel, settings toggle, multi_line, operator-pending, semicolon repeat
  • 7 e2e tests in test/specs/flash-jump-mode.e2e.ts: jump mode setting, autojump, labels, no-match, escape, default key, clever-f
  • 8 e2e tests in test/specs/flash-incremental.e2e.ts: incremental narrowing, autojump on single match, backspace, zero matches, escape, enter, min_pattern_length, operator-pending
  • 5 e2e tests in test/specs/flash-search-mode.e2e.ts: labels after /pattern Enter, label jump, non-label key clears, no labels on zero/single match
  • 3 e2e tests in test/specs/search-counter.e2e.ts: count after search, update after n, hide when cleared
  • operator-combos.e2e.ts updated to disable flash (stock f/F/t/T behavior preserved)

Documentation

  • docs/features/flash.md: New feature page — usage, multi-line, operator-pending, visual, jump mode, clever-f, configuration
  • docs/features/index.md: Added flash motions link
  • docs/features/easymotion.md: Added cross-reference to flash
  • docs/features/index.md: Updated flash description with incremental + search labels
  • docs/configuration/settings.md: Added flash, flashmultiline, flashjump, flashjumpkey, flashcleverf, flashminpatternlength, flashsearch settings
  • docs/configuration/vimrc.md: Added flash boolean and string options (including flashminpatternlength, flashsearch)
  • docs/configuration/lua-config.md: Added flash vim.opt entries (including flashminpatternlength, flashsearch)
  • docs/reference/keybindings.md: Added flash motions, jump mode, and search labels sections
  • KNOWN_LIMITATIONS.md: Added flash motions section (Phase 1 + Phase 2 + Phase 3A + Phase 3B limitations)
  • README.md: Updated flash motions feature bullet with incremental search + post-commit search labels
  • CONTRIBUTING.md: Added flash/ module, search-counter.ts, updated jump-mode.ts description
  • AGENTS.md: Updated flash motions page ownership with all settings
  • KNOWN_LIMITATIONS.md: Textarea Escape behavior updated — no longer re-dispatches to parent, symmetric context stack documented
  • README.md: Updated textarea feature description with new Escape behavior
  • CHANGELOG.md: This entry

Full Changelog: 0.66.0...0.67.0