# Keymaps

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

Inspect default shortcuts, select a preset, and customize bindings for your focused pane.

Athas shortcuts are configurable. `Cmd/Ctrl` in these docs means Command on macOS and Control
on Windows/Linux. A selected preset, a custom binding, or the focused pane can change an action's keys.

## Inspect and customize

Open Settings (`Cmd+,` on macOS, `Ctrl+,` elsewhere) and go to **Keyboard**. Search for a command,
inspect its binding and edit it with the shortcut recorder. Use import/export for custom keybindings.
Choose a keybinding preset if you want a familiar starting point.

## Common default shortcuts

| Action             | Shortcut           |
| ------------------ | ------------------ |
| Open folder        | `Cmd/Ctrl+O`       |
| Quick Open         | `Cmd/Ctrl+P`       |
| Command palette    | `Cmd/Ctrl+Shift+P` |
| Save               | `Cmd/Ctrl+S`       |
| Save as            | `Cmd/Ctrl+Shift+S` |
| Save all           | `Cmd/Ctrl+Alt+S`   |
| Close tab          | `Cmd/Ctrl+W`       |
| Reopen tab         | `Cmd/Ctrl+Shift+T` |
| Find in editor     | `Cmd/Ctrl+F`       |
| Global search      | `Cmd/Ctrl+Shift+F` |
| Source Control     | `Cmd/Ctrl+Shift+G` |
| Show/hide terminal | `Cmd/Ctrl+J`       |
| Show/hide sidebar  | `Cmd/Ctrl+B`       |

## Focus and conflicts

A binding may apply only while the editor or terminal has focus. For example, `Cmd/Ctrl+D`
selects the next occurrence in the editor but splits a focused terminal to the right.
Check the current focus and keymap when a shortcut invokes the wrong action.

[Diagnostics](https://athas.dev/docs/diagnostics) uses `Cmd/Ctrl+Shift+J` in the Athas preset and
`Cmd/Ctrl+Shift+M` in the VS Code preset. [Vim mode](https://athas.dev/docs/vim) adds editor-local modal bindings.
The command palette shows the current action and remains the easiest way to discover available commands.
