How to substite g** keymaps with \** keymaps #357
Replies: 2 comments
-
I've also faced a similar problem, and neither redefining keymaps nor opting out of basic ones like this:
helped me. What did help was explicitly redefining the g* keymap right after the Comment.setup() call. So I ended up with the following config:
|
Beta Was this translation helpful? Give feedback.
-
The default gcc keymap is (frusteratingly) an oversight with the current state of neovim itself. It's created in the execution of the runtime defaults, which is ran after all of your initial user configuration. On most distros, this will be somewhere such as: The easiest way to counter act this is to: vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
vim.keymap.set("n", "gcc", ...)
-- ...
end
}) |
Beta Was this translation helpful? Give feedback.
-
I want to replace all gc[whatever] gb[whatever] with '\c[whatever]' and '\c[whatever]' correspondingly.
My Comment set up is:
As a result now both the keymaps starting with
\
and the ones withg
are enabled.How to disable all the Comments.nvim keymaps that start with
g
in order to substitute them with\
?Beta Was this translation helpful? Give feedback.
All reactions