github saberzero1/motions 0.21.1

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

Fixed

  • Space-as-leader key mappings not matching in codemirror-vim — Vim.map(' j', 'gj') and Vim.mapCommand(' w', ...) stored literal space in the keymap (' j'), but vimKeyFromEvent produces '<Space>' on key press. The commandMatch string comparison never found a match, so leader-prefixed sequences silently failed. The fork now normalizes literal spaces to <Space> in _mapCommand (both keys and toKeys), unmap(), and removeMapCommand(). Existing angle-bracket groups (<C-Space>, <S-Space>) are preserved. This is the root-cause fix for the space-as-leader issue — the 0.21.0 plugin-side fix (unmapDefaultBinding centralization) was necessary but not sufficient without this keymap normalization. (#21)
  • Vimrc map commands registered twice — nmap, nnoremap, and other map commands in .obsidian.vimrc were processed once correctly via deferredMaps (the plugin's own parser) and then a second time via vim.handleEx() (codemirror-vim's ex command parser). The handleEx path splits arguments on whitespace, so nmap <leader>j gj with space as leader became nmap j gj — a bare j → gj mapping without the leader prefix. This double-registration was masked for non-space leaders (comma, backslash) because whitespace splitting doesn't affect those characters. Added continue after the deferredMaps.push() block, matching the pattern used by all other handled command types (let, source, set). (#21)

Documentation

  • DIFFERENCES.md (fork): added "Key string normalization for map/mapCommand" section documenting normalizeKeyString and the _mapCommand/unmap/removeMapCommand normalization points
  • KNOWN_LIMITATIONS.md: updated "EasyMotion leader key conflict" fixed section with fork-side key normalization details

Full Changelog: 0.21.0...0.21.1

Don't miss a new motions release

NewReleases is sending notifications on new releases.