Modal editing
Modal editing gives code editors Vim-style Normal, Insert and Visual modes, with the familiar motions and operators. Ingot's own shortcuts and the agent chat keep working as usual.
Turn it on
| Way | How |
|---|---|
| Command palette | Editor: Toggle Modal Editing |
| Shortcut | ⌘⌥⇧V (Ctrl+Alt+Shift+V on Windows and Linux) |
| Settings | "ingot.editor.modalEditing": true in your user settings.json |
{
"ingot.editor.modalEditing": true
}
Turning it off detaches it from every open editor at once. Click the mode in the status bar to turn it off too.
This feature used to be called Vim mode, with the setting
editor.vimMode and the command Editor: Toggle Vim Mode. The old setting is no longer read, so set ingot.editor.modalEditing if you had it on.Status bar
While modal editing is on, the left side of the status bar shows the current mode, colored so you can tell at a glance:
| Text | Mode |
|---|---|
NORMAL | moving and running commands |
INSERT | typing text |
VISUAL, VISUAL LINE, VISUAL BLOCK | selecting |
REPLACE | overwriting text |
A thin command line at the bottom of the editor shows what you type after : and any messages.
Ex commands
| Command | Does |
|---|---|
:w, :write | save |
:q, :quit | close the editor |
:q! | discard changes and close |
:wq, :x | save and close |
:wa | save all |
:qa | close all editors |
Motions and operators (hjkl, w, b, gg, G, 0, $, dd, yy, p, ciw, . and so on) work as in Vim.
Where it applies
- Code editors only. The agent composer, search fields and other inputs type normally.
- Ingot shortcuts come first. Go to File, the command palette and agent shortcuts still work from Normal mode.
- Escape closes a suggestion or find widget and leaves Insert or Visual mode in one press.
Not supported yet: a
.vimrc, custom key mappings, relative line numbers, and :e, :sp or :w <file>.