Skip to content

Conversation

@eyalk11
Copy link

@eyalk11 eyalk11 commented Nov 3, 2025

Previously, when VM encountered existing buffer-local mappings (e.g., from vim-remotions), it would skip creating its own mappings, causing motions to only work on the current cursor instead of all cursors.

This commit implements a save-and-restore mechanism:

  • Saves existing buffer mappings before overriding them
  • Restores the original mappings when VM exits
  • Properly handles all mapping attributes (noremap, silent, expr, etc.)
  • Includes support for Neovim Lua callback mappings

Fixes #280

🤖 Generated with Claude Code

Previously, when VM encountered existing buffer-local mappings (e.g.,
from vim-remotions), it would skip creating its own mappings, causing
motions to only work on the current cursor instead of all cursors.

This commit implements a save-and-restore mechanism:
- Saves existing buffer mappings before overriding them
- Restores the original mappings when VM exits
- Properly handles all mapping attributes (noremap, silent, expr, etc.)
- Includes support for Neovim Lua callback mappings

Fixes mg979#280

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

motions don't effect multi cursors when vim-remotions is installed.

1 participant