Aider keyboard shortcuts
Aider's interactive terminal prompt supports editing, history navigation, interruption, multiline input, and external-editor handoff. Its default Emacs bindings and optional vi command mode are documented separately so the active input mode is always clear.
Windows, macOS, Linux · 39 shortcutsPrompt control and multiline input
Interrupt generation, add a line without submitting, or move the current prompt into an external editor when the terminal supports the documented key sequence.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Interrupt Aider while preserving the partial response | CtrlC | CtrlC | CtrlC |
| Insert a new line without sending the message | MetaEnterorEscEnter | MetaEnterorEscEnter | MetaEnterorEscEnter |
| Open the current input in an external editor | CtrlXCtrlE | CtrlXCtrlE | CtrlXCtrlE |
Default Emacs input mode
Navigate and edit the current prompt with the Emacs-style bindings that Aider enables by default through prompt-toolkit.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Move up one line in the current message | Up | Up | Up |
| Move down one line in the current message | Down | Down | Down |
| Scroll back through previously sent messages | CtrlUp | CtrlUp | CtrlUp |
| Scroll forward through previously sent messages | CtrlDown | CtrlDown | CtrlDown |
| Move the cursor to the start of the line | CtrlA | CtrlA | CtrlA |
| Move the cursor back one character | CtrlB | CtrlB | CtrlB |
| Delete the character under the cursor | CtrlD | CtrlD | CtrlD |
| Move the cursor to the end of the line | CtrlE | CtrlE | CtrlE |
| Move the cursor forward one character | CtrlF | CtrlF | CtrlF |
| Delete from the cursor to the end of the line | CtrlK | CtrlK | CtrlK |
| Clear the screen | CtrlL | CtrlL | CtrlL |
| Move down to the next history entry | CtrlN | CtrlN | CtrlN |
| Move up to the previous history entry | CtrlP | CtrlP | CtrlP |
| Reverse-search command history | CtrlR | CtrlR | CtrlR |
| Paste text that was previously cut | CtrlY | CtrlY | CtrlY |
Optional vi input mode
Use these command-mode controls after starting Aider with --vim. Escape enters command mode, while i, a, A, and I return to insert mode at different positions.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Move up one line in the current message | Up | Up | Up |
| Move down one line in the current message | Down | Down | Down |
| Scroll back through previously sent messages | CtrlUp | CtrlUp | CtrlUp |
| Scroll forward through previously sent messages | CtrlDown | CtrlDown | CtrlDown |
| Switch to command mode | Esc | Esc | Esc |
| Switch to insert mode | i | i | i |
| Move right one character and switch to insert mode | a | a | a |
| Move to the line end and switch to insert mode | A | A | A |
| Move to the line beginning and switch to insert mode | I | I | I |
| Move one character left | h | h | h |
| Move down one line | j | j | j |
| Move up one line | k | k | k |
| Move one character right | l | l | l |
| Move forward one word | w | w | w |
| Move backward one word | b | b | b |
| Move to the beginning of the line | 0 | 0 | 0 |
| Move to the end of the line | $ | $ | $ |
| Delete the character under the cursor | x | x | x |
| Delete the current line | dd | dd | dd |
| Undo the last change | u | u | u |
| Redo the last undone change | CtrlR | CtrlR | CtrlR |