Skip to content

Unable to remap ; as motion key with g:VM_custom_motions (mapping ignored) #295

@SpaceShaman

Description

@SpaceShaman

Hello!
I would like to use jkl; as my motion keys in vim-visual-multi (instead of default hjkl).
I set up the following mapping:

let g:VM_custom_motions = {'j': 'h', 'k': 'j', 'l': 'k', ';': 'l'}

or (in Lua):

vim.g.VM_custom_motions = { j = 'h', k = 'j', l = 'k', [';'] = 'l' }

Expected behavior:

  • Pressing ; in VM moves the cursor right, exactly like pressing l (in accordance with documentation).

Actual behavior:

  • j, k, l are correctly remapped (they move as expected),
  • but ; does NOT work as motion (pressing ; does nothing or repeats previous f/t as in default Vim; it does not move the cursor right in visual-multi).

What I tried:

  • Setting g:VM_custom_motions via both VimL and Lua.
  • Using both ; and [';'] keys in the mapping table.
  • Ensuring there is no other mapping or plugin that could shadow the mapping.
  • Mapping a different letter (e.g. p = 'l') works fine, so the custom motions are picked up.

Environment:

  • Neovim version: v0.11.2
  • vim-visual-multi version: master
  • OS: Debian 12

Summary:
According to documentation, remapping ; as a motion key is supported, but in practice the plugin ignores this mapping. All other remappings for letters work fine.
Please advise if this is a bug, or if there is a recommended workaround.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions