Toggle command
/vim is a local command defined in src/commands/vim/index.ts and implemented in src/commands/vim/vim.ts.
The implementation is intentionally small:
- read global config
- map legacy
emacstonormal - toggle
editorModebetweennormalandvim - persist the new value
- emit an analytics event
What the command tells the user
When enabling Vim mode, the command returns:- use Escape to toggle between INSERT and NORMAL modes
- standard readline bindings are active again
Keybinding schema support
src/keybindings/schema.ts shows the larger keyboard model used by the UI. It defines contexts and actions such as:
- global app actions
- chat input actions
- confirmation actions
- transcript actions
- diff actions
- plugin actions
- voice push-to-talk
command:<name> bindings that directly invoke slash commands.