mg979 / vim-visual-multi

Multiple cursors plugin for vim/neovim
MIT License
4.12k stars 77 forks source link

Pressing `cl` breaks into new lines during multiple cursors when using with `noice.nvim` #260

Open kohane27 opened 6 months ago

kohane27 commented 6 months ago

Hello! Hope you're doing well.

Description

https://github.com/mg979/vim-visual-multi/assets/57322459/b37f6c0c-3eef-4989-a290-9c5388834c7c

When there are multiple cursors, pressing cl breaks into new lines. Disabling noice.nvim fixed it; but I want vim-visual-multi to play nicely with noice.nvim.

Steps to reproduce

  1. <C-S-n> 2 times to create a column of cursors
  2. cl to delete the character to the right
  3. issue occurred

Config

I'm using lazy.nvim:

return {
  "mg979/vim-visual-multi",
  config = function()
    -- create a column of cursors from visual mode
    vim.api.nvim_set_keymap(
      "n",
      "<C-S-n>",
      ":call vm#commands#add_cursor_down(0, v:count1)<cr>",
      { noremap = true, silent = true }
    )
    vim.cmd([[
    " all mappings disabled except <C-n> (<C-n> can't be remapped)
    let g:VM_default_mappings = 0

    " To change any mapping you must first initialize the variable:
    let g:VM_maps = {}
    let g:VM_maps['Find Under'] = "<C-n>"

    " https://github.com/mg979/vim-visual-multi/issues/172
    let g:VM_maps['I BS'] = "" " disable backspace mapping
    let g:VM_maps['I CtrlC'] = "" " disable backspace mapping

]])
  end,
}

System

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1702233742

ArchLinux (Linux 6.7.4-arch1-1)

Thank you!

Ajaymamtora commented 4 months ago

Did you manage to find a way to fix this? I have the same issue