Skip to content

Instantly share code, notes, and snippets.

@bnm3k
Created May 18, 2022 17:35
Show Gist options
  • Save bnm3k/48892d32194264fa3ff7f986b80aa514 to your computer and use it in GitHub Desktop.
Save bnm3k/48892d32194264fa3ff7f986b80aa514 to your computer and use it in GitHub Desktop.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment