# Explore code

Canonical HTML: [Explore code](https://getred.dev/docs/editor/explore). Website source: `b575efb819e5e2edcb70eb047efb8aa8108c2ce1`. Documented Red release: v0.11.1. Installer source: `5b15a726e98f5a4c7e8a05aa18523bf1708d8339`.

Read unfamiliar code with a sidebar that follows the cursor, dim a function to the calls that matter, and walk a trail of definitions, without a model or a language server.

<a id="turn-it-on"></a>

## Turn it on

Code explore is a reading mode. Press `Space e e`, `Space E`, or run `:explore` to open a sidebar that follows the cursor: the function you are in, the name under the cursor, its definition, and its matches. It never sends your code to a model, and `gd` still asks the language server.

> **Moved in v0.11.0**
>
> The error list moved from `Space e` to `Space D`, because `Space e` is now the explore group.

<a id="keys"></a>

## Keys

`Space e f`Follow the name under the cursor through this function

`Space e s`Dim the function except calls into the project and the system

`Space e d`Jump to the definition in the index

`Space e t`Jump to the explicit type

`Space e j / k`Next or previous match

`Space e b / n`Walk the review trail back or forward

`Space e R`Index the repository's source files

`Space e p`Index only this branch's changed files

`Space e ?`Show every explore key

While explore is on, double-clicking a name follows it, and clicking a reference or definition jumps there. Jumps are recorded on the trail.

<a id="what-the-index-knows"></a>

## What the index knows

Explore reads the current buffer when it opens. `Space e R` walks the repository, respecting `.gitignore`, and parses up to 400 source files with Red's Tree-sitter grammars in the background. The index maps names to files and lines: matches are shared spellings, not type-checked references, and types are only the ones written in the source.
