Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/yetone/avante.nvim/llms.txt

Use this file to discover all available pages before exploring further.

Avante.nvim provides comprehensive keybindings organized by category. All keymaps can be customized in your configuration.
Keymaps are only set if behaviour.auto_set_keymaps = true (default). Avante uses safe keymap setting, meaning existing mappings won’t be overridden.
Keymaps active when the Avante sidebar is focused.
KeyActionDescriptionConfig Path
]pNext promptNavigate to next prompt in historymappings.sidebar.next_prompt
[pPrevious promptNavigate to previous prompt in historymappings.sidebar.prev_prompt
AApply allApply all suggested changesmappings.sidebar.apply_all
aApply cursorApply change at cursor positionmappings.sidebar.apply_cursor
rRetry requestRetry the last user requestmappings.sidebar.retry_user_request
eEdit requestEdit the last user requestmappings.sidebar.edit_user_request
TabSwitch windowsSwitch between sidebar windowsmappings.sidebar.switch_windows
Shift+TabReverse switchSwitch windows in reverse ordermappings.sidebar.reverse_switch_windows
Shift+TabExpand tool useExpand tool usage detailsmappings.sidebar.expand_tool_use
xToggle code windowShow/hide code windowmappings.sidebar.toggle_code_window
dRemove fileRemove file from contextmappings.sidebar.remove_file
@Add fileAdd file to contextmappings.sidebar.add_file
qClose sidebarClose the sidebarmappings.sidebar.close
Default Configuration:
mappings = {
  sidebar = {
    expand_tool_use = "<S-Tab>",
    next_prompt = "]p",
    prev_prompt = "[p",
    apply_all = "A",
    apply_cursor = "a",
    retry_user_request = "r",
    edit_user_request = "e",
    switch_windows = "<Tab>",
    reverse_switch_windows = "<S-Tab>",
    toggle_code_window = "x",
    remove_file = "d",
    add_file = "@",
    close = { "q" },
    close_from_input = nil, -- e.g., { normal = "<Esc>", insert = "<C-d>" }
    toggle_code_window_from_input = nil, -- e.g., { normal = "x", insert = "<C-;>" }
  },
}
Source: lua/avante/config.lua:649-669

Global Keymaps

Keymaps available globally in normal and visual modes.
KeyActionDescriptionConfig Path
LeaderaaAskAsk AI about codemappings.ask
LeaderanNew askCreate new ask sessionmappings.new_ask
LeaderazZen modeToggle Zen Mode (full-screen chat)mappings.zen_mode
LeaderaeEditEdit selected code blocksmappings.edit
LeaderarRefreshRefresh sidebarmappings.refresh
LeaderafFocusSwitch focus between windowsmappings.focus
LeaderaSStopStop current AI requestmappings.stop
LeaderatToggleToggle sidebar visibilitymappings.toggle.default
LeaderadToggle debugToggle debug modemappings.toggle.debug
LeaderaCToggle selectionToggle selection hintsmappings.toggle.selection
LeaderasToggle suggestionToggle auto-suggestionsmappings.toggle.suggestion
LeaderaRToggle repomapShow/hide repository mapmappings.toggle.repomap
Leadera?Select modelOpen model selectormappings.select_model
LeaderahSelect historyBrowse chat historiesmappings.select_history
Default Configuration:
mappings = {
  ask = "<leader>aa",
  new_ask = "<leader>an",
  zen_mode = "<leader>az",
  edit = "<leader>ae",
  refresh = "<leader>ar",
  focus = "<leader>af",
  stop = "<leader>aS",
  toggle = {
    default = "<leader>at",
    debug = "<leader>ad",
    selection = "<leader>aC",
    suggestion = "<leader>as",
    repomap = "<leader>aR",
  },
  select_model = "<leader>a?",
  select_history = "<leader>ah",
}
Source: lua/avante/config.lua:635-648, 674-675

Suggestion Keymaps

Keymaps for auto-suggestion mode (insert mode).
These keymaps are only available when behaviour.auto_suggestions = true.
KeyActionDescriptionConfig Path
Alt+lAcceptAccept current suggestionmappings.suggestion.accept
Alt+]NextShow next suggestionmappings.suggestion.next
Alt+[PreviousShow previous suggestionmappings.suggestion.prev
Ctrl+]DismissDismiss current suggestionmappings.suggestion.dismiss
Default Configuration:
mappings = {
  suggestion = {
    accept = "<M-l>",
    next = "<M-]>",
    prev = "<M-[>",
    dismiss = "<C-]>",
  },
}
Source: lua/avante/config.lua:616-621

Diff Keymaps

Keymaps for resolving code conflicts.
KeyActionDescriptionConfig Path
coChoose oursAccept current versionmappings.diff.ours
ctChoose theirsAccept incoming changemappings.diff.theirs
caChoose all theirsAccept all incoming changesmappings.diff.all_theirs
cbChoose bothKeep both versionsmappings.diff.both
ccChoose cursorAccept change at cursormappings.diff.cursor
]xNext conflictJump to next conflictmappings.diff.next
[xPrevious conflictJump to previous conflictmappings.diff.prev
Default Configuration:
mappings = {
  diff = {
    ours = "co",
    theirs = "ct",
    all_theirs = "ca",
    both = "cb",
    cursor = "cc",
    next = "]x",
    prev = "[x",
  },
}
Source: lua/avante/config.lua:607-615

Files Keymaps

Keymaps for managing files in the chat context.
KeyActionDescriptionConfig Path
LeaderacAdd currentAdd current buffer to contextmappings.files.add_current
LeaderaBAdd all buffersAdd all open buffers to contextmappings.files.add_all_buffers
Default Configuration:
mappings = {
  files = {
    add_current = "<leader>ac",
    add_all_buffers = "<leader>aB",
  },
}
Source: lua/avante/config.lua:670-673

Submit & Cancel Keymaps

Keymaps for submitting or canceling actions.
KeyModeActionConfig Path
EnterNormalSubmitmappings.submit.normal
Ctrl+sInsertSubmitmappings.submit.insert
Ctrl+cBothCancelmappings.cancel.normal / insert
EscNormalCancelmappings.cancel.normal
qNormalCancelmappings.cancel.normal
Default Configuration:
mappings = {
  submit = {
    normal = "<CR>",
    insert = "<C-s>",
  },
  cancel = {
    normal = { "<C-c>", "<Esc>", "q" },
    insert = { "<C-c>" },
  },
}
Source: lua/avante/config.lua:626-633

Jump Keymaps

Keymaps for jumping between sections.
KeyActionDescriptionConfig Path
]]NextJump to next sectionmappings.jump.next
[[PreviousJump to previous sectionmappings.jump.prev
Default Configuration:
mappings = {
  jump = {
    next = "]]",
    prev = "[[",
  },
}
Source: lua/avante/config.lua:622-625

Confirm Keymaps

Keymaps for confirmation windows.
KeyActionDescriptionConfig Path
Ctrl+wfFocus windowFocus confirm windowmappings.confirm.focus_window
cConfirm codeConfirm code changesmappings.confirm.code
rConfirm responseConfirm responsemappings.confirm.resp
iConfirm inputConfirm inputmappings.confirm.input
Default Configuration:
mappings = {
  confirm = {
    focus_window = "<C-w>f",
    code = "c",
    resp = "r",
    input = "i",
  },
}
Source: lua/avante/config.lua:676-681

Plug Mappings

Low-level plug mappings available for custom keybinding.
Plug MappingDescriptionModes
<Plug>(AvanteAsk)Ask AIn, v
<Plug>(AvanteAskNew)New ask sessionn, v
<Plug>(AvanteChat)Start chatn, v
<Plug>(AvanteEdit)Edit selectionv
<Plug>(AvanteRefresh)Refresh windowsn
<Plug>(AvanteFocus)Switch focusn
<Plug>(AvanteBuild)Build dependenciesn
<Plug>(AvanteToggle)Toggle sidebarn
<Plug>(AvanteToggleDebug)Toggle debugn
<Plug>(AvanteToggleSelection)Toggle selectionn
<Plug>(AvanteToggleSuggestion)Toggle suggestionn
<Plug>(AvanteConflictOurs)Choose oursn, v
<Plug>(AvanteConflictTheirs)Choose theirsn, v
<Plug>(AvanteConflictBoth)Choose bothn, v
<Plug>(AvanteConflictAllTheirs)Choose all theirsn, v
<Plug>(AvanteConflictCursor)Choose at cursorn, v
<Plug>(AvanteConflictNextConflict)Next conflictn
<Plug>(AvanteConflictPrevConflict)Previous conflictn
<Plug>(AvanteSelectModel)Select modeln
Example:
-- Custom keymap using plug mapping
vim.keymap.set('n', '<leader>ai', '<Plug>(AvanteAsk)', { desc = 'Avante Ask' })
vim.keymap.set('v', '<leader>ae', '<Plug>(AvanteEdit)', { desc = 'Avante Edit' })
Source: lua/avante/init.lua:89-119

Customization Example

require('avante').setup({
  mappings = {
    -- Change ask keymap
    ask = "<leader>ai",
    
    -- Disable auto keymaps
    -- behaviour = { auto_set_keymaps = false },
    
    -- Custom sidebar keymaps
    sidebar = {
      apply_all = "<leader>A",
      apply_cursor = "<leader>a",
      close = { "q", "<Esc>" },
    },
    
    -- Custom diff keymaps
    diff = {
      ours = "<leader>co",
      theirs = "<leader>ct",
      next = "]c",
      prev = "[c",
    },
    
    -- Custom suggestion keymaps (insert mode)
    suggestion = {
      accept = "<C-l>",
      next = "<C-j>",
      prev = "<C-k>",
      dismiss = "<C-h>",
    },
  },
})