Focus mode
Development reference · View source
:focus toggles fading across all buffer and terminal panes in the current
workspace. It starts in the state focus.enabled names, disabled by default.
The toggle lasts for this session and is not written back to the file, the
same as Space p s for editor.soft_wrap. An active buffer pane retains its original colors
near the primary cursor; more distant display rows blend smoothly toward the
pane background. Active terminal panes remain fully opaque across every row,
including cursorless applications such as htop and terminal review. Inactive
buffer and terminal panes use a uniform opacity. Foreground, background,
and underline colors all fade, including terminal ANSI colors, selections,
and syntax highlighting. Pane titles, borders, overlays, and status lines keep
their normal appearance. Native image/PDF previews are not text and do not fade.
Color emoji are a known limitation: their bitmap glyphs bypass text
foreground colors in the native window, so they remain vivid even at zero
opacity. External terminals may likewise preserve emoji colors. Their cell
backgrounds still fade.
focus:
enabled: false
radius: 2
fade_distance: 50
minimum_opacity: 70
inactive_opacity: 70
inactive_theme: null
enabled: whether fading is on when the editor starts. To have every workspace start with it, set it totrue.radius: buffer display rows on either side of the cursor that retain full color (0–65535). Wrapped rows count separately.fade_distance: additional rows over which a smooth curve reaches the minimum opacity (1–65535).minimum_opacity: visibility of distant rows in the active buffer pane (0–100 percent).inactive_opacity: visibility of all rows in inactive panes (0–100 percent).inactive_theme: optional built-in or custom theme name for inactive panes, including syntax, selections, gutters, titles, and borders. Omitted ornullkeeps the main theme everywhere. Fading blends toward the selected pane theme’s background; useinactive_opacity: 100for the theme difference alone.
Space o o offers Inactive pane theme beside Focus mode. Its picker
previews changes, supports the usual dark/light filter, saves on Enter, and
restores the previous choice on Escape. Same as main theme saves null.
You can choose a theme with focus disabled; it takes effect when focus is enabled.
The active pane and shared UI keep the main theme. Terminal ANSI palettes still
follow editor.terminal_theme_colors; explicit terminal colors keep their usual
behavior.
Edit these settings in YAML and run :config-reload to tune the effect. A
reload adopts every value in the file, enabled included, so a :focus
toggle is replaced by the file’s value, as a soft-wrap toggle is. Set
enabled: true while tuning to keep the effect visible across reloads. Zero opacity blends completely into the background;
100 preserves the original colors. Fading is spatial, without an animated
transition. If a buffer cursor is outside the viewport, its active pane uses
minimum opacity throughout. Terminal cursor visibility and position do not
affect focus fading.
Truecolor gives the smoothest results; limited terminal palettes quantize the
blended colors. A custom theme using reset for the pane background cannot
be blended because the external terminal owns that color, so fading is skipped
for that pane. No buffer text or terminal output is modified.