# How to exit Skink (quit, save and close)

> How to quit Skink: Ctrl+Q closes the tab and quits on the last one, with a save prompt for unsaved changes. Also closing terminal tabs, panes and quitting all.

Source: https://skink.cc/start/exit-skink/

Press Ctrl+Q. It closes the current tab, and on the last file tab it quits Skink. If the file has unsaved changes, Skink asks first.

F4 and F10 do the same thing. You can also type `:quit` in the command line.

That's it: no mode to escape from, no secret word to type. If you came here from years of "how do I exit vim" jokes, Skink is modeless on purpose, so the key that quits always quits.

## The quit keys

| Key | Does |
|---|---|
| Ctrl+Q | Close the tab. On the last file tab, quit Skink |
| F4 or F10 | Same as Ctrl+Q (while debugging, F10 steps over) |
| Ctrl+S (or F2) | Save the file |
| F11 | Close the active terminal tab (while debugging, it steps into) |
| Alt+Q | Close the focused split pane (its tab stays open) |

## Save and quit

There is no single "save and quit" key. Press Ctrl+S, then Ctrl+Q.

Or just press Ctrl+Q and answer the prompt with y.

## Unsaved changes

When you close a tab that has unsaved edits, the status line asks:

```text
Save changes before quitting? (y)es / (n)o / Esc
```

(It says "closing" instead of "quitting" when other file tabs remain.)

- y saves, then closes.
- n closes without saving. The edits are gone.
- Esc cancels, so you stay in the file.

### Crash recovery

Skink also backs up unsaved edits a few seconds after you stop typing. If Skink or your terminal crashes, opening the file again offers to recover them.

## Quit from the command line

Press Ctrl+E, type `quit` and press Enter. The command line already shows the `:`, so typing `quit` gives you `:quit`.

| Command | Does |
|---|---|
| `:quit` or `:q` | Close the tab (quits on the last file tab), same as Ctrl+Q |
| `:qa` or `:quitall` | Quit everything. Refuses when any tab has unsaved changes |
| `:save` or `:w` | Save the file |
| `:unsplit` | Close the focused pane |
| `:only` | Close every pane except the focused one |

There is no `:wq` or `:q!`. Run `:w`, then `:q`.

To throw changes away, run `:q` and answer n at the save prompt.

## Closing terminal tabs

In a terminal tab, almost every key goes to the program running inside. So Ctrl+Q and F10 reach the shell (or `htop`, or your AI CLI) rather than Skink.

To leave a terminal tab:

- F11 closes the terminal tab.
- Or type `exit` in the shell. A finished terminal closes on the next key you press.
- F12 jumps back to your file, where Ctrl+Q works again.

Closing the last file tab quits Skink, and any terminal tabs close with it.

**Stuck somewhere else?:**
- A prompt, the find bar or a popup has the keys: press Esc.
- The file tree has the keys (the status line says TREE): press Esc or q to go back to the editor.
- Everything except the text vanished: you are in zoom mode. Press Alt+Z or type `:zoom` to get the tab bar and status line back. See [Hidden files and panels](https://skink.cc/editing/hidden-files-and-panels/).
- You recorded a macro by accident (the status line shows ● REC): press Ctrl+U to stop.

## Coming back

Run `skink` with no arguments in the same project and it reopens your files, cursors, splits and shells where you left them.

Turn that off with `"restoresession": false`. See [Sessions and folding](https://skink.cc/editing/sessions-and-folding/).

All keys are listed in [Keyboard shortcuts](https://skink.cc/reference/shortcuts/).
