Skip to content

remapping n as down (j) is not working #292

@mrdandelion6

Description

@mrdandelion6

heres my code

  vim.g.VM_custom_motions = {
    ['k'] = remaps['k'],
    ['n'] = remaps['n'],
    ['e'] = remaps['e'],
    ['i'] = remaps['i'],
  }

which expands to

  vim.g.VM_custom_motions = {
    ['k'] = 'h',
    ['n'] = 'j',
    ['e'] = 'k',
    ['i'] = 'l',
  }

and it works perfectly fine for using k,e,i instead of h,k,l. but i cant seem to make n the down movement (j). i tried using other characters like ['u'] = 'j' and it works fine. seems to only be an issue with the n key.

i use colemak-dh for my keyboard and knei instead of hjkl so this is an issue for me.

here are the rest of my settings for context:

-- in core/keymaps.lua
  vim.g.VM_maps = {
    ['Find Under'] = '<Leader>ah',
    ['Find Subword Under'] = '<Leader>ah',
    ['Add Cursor Down'] = '<Leader>an',
    ['Add Cursor Up'] = '<Leader>ae',
    ['Next'] = 'h',
    ['Prev'] = 'H',
    ['i'] = remaps['i'],
    ['I'] = remaps['I'],
  }

-- in plugins/multicursor.lua
return {
  'mg979/vim-visual-multi', -- allows for multi selection in buffer.
  branch = 'master',
  lazy = false,
  init = function()
    vim.g.VM_default_mappings = 0
    vim.g.VM_mouse_mappings = 0

    -- we may have existing mappings from core/keymaps.lua
    local existing_maps = vim.g.VM_maps or {}
    existing_maps['Select All'] = '<Leader>aa'
    existing_maps['Visual All'] = '<Leader>aa'
    existing_maps['Visual Cursors'] = '<Leader>ad'
    existing_maps['Skip Region'] = 'b'
    vim.g.VM_maps = existing_maps
  end,
}

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