vim-visual-multi
vim-visual-multi copied to clipboard
C-n jumps to the start of the next line first time it is used
Describe the issue:
I have the plugin installed with lazy.nvim and have it set up to not load lazily. When I type <C-n>
instead of going to the next word the cursor jumps to the start of the next line. When I redo the steps it works normally
Steps to reproduce
- Go to a word
-
<C-n>
- Cursor goes to the next line
- Operating System: Mac OS 13.4
- Vim Version: NVIM v0.9.0 Build type: Release
- commit SHA/branch: latest
There was a similar issue, but I can't find it, try #241.
I tried :echo VM_maps["Find Under"]
it says I don't have it (E716: Key not present in Dictionary: "Find Under"
)
When you start neovim, before starting VM for the first time, see what says
nmap <c-n>
No mapping found
If I disable the plugin the cursor goes to the next line every time
If I disable the plugin the cursor goes to the next line every time
Because it's the normal behaviour for c-n
. I'm pretty sure it's an issue with the package manager and I don't know how to fix it. Try putting the plugin in pack/start
or pack/opt
then add it with packadd
in your vimrc.
Also I don't understand how it can work the second time, since c-n
isn't mapped.
The above https://github.com/BerkeleyTrue/dotfiles/commit/a3b4487d8d5dae88ab13901c5fa821fc4674ad77 fixed issue for me. ( lazy=false) . I think issue can be closed.
With Lazy.nvim, even with lazy=false
i still face the same issue
{
"mg979/vim-visual-multi",
lazy = false,
},
ok, you are right - visual mode still did not work. My workaround is to call vm in any way, so that its
{
"mg979/vim-visual-multi", --multi cursor
config = function()
vim.g.VM_mouse_mappings = 1
vim.cmd[[VMDebug]] -- fixes the ctrl+n in visuala mode
end,
},
Above answer didn't solve it, but helped by showing me the overwritten imap error in the debug message from #172
Disabling windwp/nvim-autopairs
made the problem completely go away so i modified the lazy config like this.
It definitely solved the issue.
{
"mg979/vim-visual-multi",
init = function()
vim.g.VM_maps = {
["I BS"] = '',
}
end,
},