If you're using the neovim plugin aerial and want to override the default key bindings without modifying ftplugin/aerial.vim
, replace the keys table as follows:
require("aerial.bindings").keys = {
{ "<CR>", "<cmd>lua require'aerial'.select()<CR>", "Jump to the symbol under the cursor" },
-- and so on for the rest
}
Make sure to use the format that aerial uses in aerial/binding.lua.
Also make sure that setup
is called after, not before overriding keys
, and that default_bindings
is set to true
require("aerial").setup({
default_bindings = true, -- default
-- rest of configs
})
You don't necessarily have to replace the keys table entirely, you can also add to it, or replace a single entry.