# Vim mode

Source: https://athas.dev/docs/vim

Enable modal editing, use supported Vim commands, and resolve shortcut conflicts.

Vim mode adds modal editing to the Athas editor. It does not load your Neovim configuration or
provide a Neovim plugin runtime.

## Enable Vim mode

Turn on **Vim Mode** in Settings. Enable relative line numbers if you prefer them for movement.
Use `i` to enter Insert mode and `Esc` to return to Normal mode. The command palette also includes
**Vim: Enter … Mode** actions.

## Common commands

| Command              | Action                                           |
| -------------------- | ------------------------------------------------ |
| `:w`                 | Save current file                                |
| `:wq` or `:x`        | Save and close current file                      |
| `:q`                 | Close current file through the normal close flow |
| `:q!`                | Force close current file without saving          |
| `:command` or `:cmd` | Open the command palette                         |
| `:explore` or `:Ex`  | Open file navigation                             |
| `:preview`           | Toggle Markdown preview for a Markdown buffer    |

Start with a disposable file when learning commands that delete text or close unsaved buffers.

## Shortcuts and focus

Vim handles keys inside the editor, while Athas shortcuts control workspaces and other panes.
Bindings can depend on Normal/Insert mode and on which pane has focus. Inspect [Keymaps](https://athas.dev/docs/keymaps)
when a shortcut behaves differently from your usual editor.

For a full external terminal editor, choose Neovim, Helix, Vim, or a custom command in the editor
settings. That workflow uses your external executable and configuration.
