# Syntax & Error Highlighting

> Color-code commands and underline errors in real time as you type in Warp's input editor.

- 网址：https://funcoding.ai/agents/warp/terminal/editor/syntax-error-highlighting/
- 来源：Warp 官方文档原文（英文），MIT 许可，同步于 2026-10-11
- 官方原文：https://docs.warp.dev/terminal/editor/syntax-error-highlighting/

---
## What is syntax highlighting

Warp supports syntax highlighting in the [Input Editor](https://funcoding.ai/agents/warp/terminal/editor/). It colors each part of a command to help differentiate between sub-commands, options/flags, arguments, and variables.

<div class="callout callout-warning">

Newly installed apps or newly created aliases will not trigger syntax highlighting until you open a new Warp session (new window, tab, or pane), even if you `source` the RC files in the current session.

</div>

### How to access syntax highlighting

When syntax highlighting is enabled, Warp's [Input Editor](https://funcoding.ai/agents/warp/terminal/editor/) automatically recognizes each part of the command as you type it into the Input Editor, and syntactically highlights them.

### How to enable/disable syntax highlighting

Syntax highlighting is enabled by default, to toggle it:

* Through the [Command Palette](https://funcoding.ai/agents/warp/terminal/command-palette/), search for the "Syntax Highlighting" option and click it (or press enter) to enable/disable.
* Through **Settings** > **Features** > **Terminal Input**, toggle "Syntax highlighting for commands".

### How syntax highlighting works

## What is error underlining

Warp highlights errors in commands that are typed within the [Input Editor](https://funcoding.ai/agents/warp/terminal/editor/) e.g. if the binary for the command you've typed does not exist.

<div class="callout callout-warning">

Newly installed apps or newly created aliases will trigger error underlining until you open a new Warp session (new window, tab, or pane), even if you `source` the RC files in the current session.

</div>

### How to access error underlining

When error underlining is enabled, Warp automatically underlines any invalid commands with a dashed red underline.

### How to enable/disable error underlining

Error underlining is enabled by default, to toggle it:

* Through the [Command Palette](https://funcoding.ai/agents/warp/terminal/command-palette/), search for the "Syntax Highlighting" option and click it (or press enter) to enable/disable.
* Through **Settings** > **Features** > **Terminal Input**, toggle "Error underlining for commands".

### How error underlining works
