---
title: The assistive editor
description: The input field helps as you type — completion, highlighting, a validity indicator, and hints.
sidebar:
  order: 2
---

import Demo from '../../../components/Demo.astro';

You type commands into the input field at the bottom of the screen, and it
helps you as you go. None of this gets in your way — it is all advisory.

<Demo src="/casts/assistive-editor.cast" title="Tab completes a table name; the [ERR] marker catches a misspelled one before you submit." />

## Completion

Press <kbd>Tab</kbd> to complete what you are typing. Completion knows about
the commands, the keywords for the current position, your **table, column,
index, and relationship names**, and — in advanced mode — common SQL
function names. It is the fastest way to discover what is available without
leaving the keyboard.

## Syntax highlighting

As you type, the input is coloured live: keywords, identifiers, column
**types**, and SQL function names each get their own colour, so a command's
shape is visible before you run it.

## The validity indicator

A small marker appears at the right-hand edge of the input line and tells
you, *before you submit*, whether the command would run:

- **`[ERR]`** — the command will fail as written (for example, an unknown
  table or column, or a value that doesn't match a column's type).
- **`[WRN]`** — the command will run, but something looks suspect (for
  example, comparing a number column with a text pattern).

It is purely advisory — it never blocks you from submitting.

## Hints

A hint line below the input offers contextual guidance — the next token that
would fit, the type expected at the current position, and help with the most
recent error. When the input is empty it reminds you that <kbd>Tab</kbd>
lists options and `help` lists commands.

## Editing the line

Move and edit within the line with the usual keys: <kbd>←</kbd>/<kbd>→</kbd>
by character, <kbd>Home</kbd>/<kbd>End</kbd> to the ends, and
<kbd>Delete</kbd>/<kbd>Backspace</kbd> to remove characters. Readline-style
shortcuts work too: <kbd>Ctrl</kbd>+<kbd>A</kbd> / <kbd>Ctrl</kbd>+<kbd>E</kbd>
jump to the start / end of the line, <kbd>Ctrl</kbd>+<kbd>W</kbd> deletes the
word before the cursor, <kbd>Ctrl</kbd>+<kbd>K</kbd> clears from the cursor to
the end of the line, <kbd>Ctrl</kbd>+<kbd>U</kbd> clears from the start to the
cursor, and <kbd>Esc</kbd> clears the whole line at once (or, right after you
accept a completion, undoes that first).

Your project-scoped command history is available with <kbd>↑</kbd>/<kbd>↓</kbd>.
If you recall an advanced-mode (SQL) command while you are in simple mode, it
comes back with a leading `:` — the [one-line escape to advanced
mode](/getting-started/modes/) — so it still runs exactly as you typed it.

A long command does not get cut off: the line scrolls sideways to keep the
cursor in view, and on a tall terminal the input field uses two rows so you
can see more of it at once.

:::note[Planned]
Multi-line entry — <kbd>Enter</kbd> inserting a newline, with a separate key to
submit — is planned and not yet available.
:::
