This works fine in Vim 9.1 (included patches: 1-818), but not in NVIM v0.11.1. Both with same plugin manager vim-plug.
In Neovim maps like ]e and [e work, but not ]b nor [b. Instead the default ones are keep, see _defaults.lua
-- Buffers
vim.keymap.set('n', '[b', function()
cmd({ cmd = 'bprevious', count = vim.v.count1 })
end, { desc = ':bprevious' })
vim.keymap.set('n', ']b', function()
cmd({ cmd = 'bnext', count = vim.v.count1 })
end, { desc = ':bnext' })
I did manually remap them and now they work
if has('nvim')
nmap <silent> [b <Plug>JumpDiffCharPrevStart
nmap <silent> ]b <Plug>JumpDiffCharNextStart
endif
...but I request to fix the override. Actually I ask:
- fix code for Neovim or help me find why to me is not proper overwritten
- add a global option to no auto-load plugin mappings
Thanks in advance!