Edit Input Fields#
Overview#
NeoMutt has a built-in line editor for inputting text wherever you type at a prompt β for example, email addresses in header fields, filenames, search patterns, and command lines. The key bindings follow Emacs conventions.
Key Bindings#
Movement#
Key |
Function |
Description |
|---|---|---|
Ctrl-A or <Home> |
Move to the start of the line |
|
Ctrl-E or <End> |
Move to the end of the line |
|
Ctrl-B or <Left> |
Move back one character |
|
Ctrl-F or <Right> |
Move forward one character |
|
Alt-B |
Move back one word |
|
Alt-F |
Move forward one word |
Deletion#
Key |
Function |
Description |
|---|---|---|
Ctrl-D or <Delete> |
Delete the character under the cursor |
|
<Backspace> |
Delete the character before the cursor |
|
Ctrl-K |
Delete to the end of the line |
|
Ctrl-U |
Delete the entire line |
|
Ctrl-W |
Delete the word before the cursor |
|
Alt-d |
Delete to the end of the word |
Word Case#
Key |
Function |
Description |
|---|---|---|
Alt-u |
Convert word to upper case |
|
Alt-l |
Convert word to lower case |
|
Alt-c |
Capitalize the word |
Miscellaneous#
Key |
Function |
Description |
|---|---|---|
Ctrl-V |
Quote (escape) the next typed key |
|
Ctrl-G |
n/a |
Abort the current prompt or action |
<Return> |
n/a |
Confirm / finish editing |
Tab Completion#
Press <Tab> to trigger completion. What gets completed depends on context:
Filenames β completes paths in the filesystem
Aliases β completes known address aliases
Labels β completes mailbox labels
Press Ctrl-T to run an address query (using $query_command) and complete from the results.
Remapping Editor Keys#
Use the :bind command with the editor map to remap any function.
For example, to make <Delete> behave like <Backspace> (deleting the character before the cursor instead of under it):
bind editor <delete> backspace
Using an External Editor#
Set $editor to launch an external editor for composing message bodies:
set editor = "vim"
The built-in line editor is still used for all prompt fields (To, Subject, etc.). The external editor is invoked only for the message body when composing.