Skip to content
| Marketplace
Sign in
Visual Studio Code>Themes>FocusMode+New to Visual Studio Code? Get it now.
FocusMode+

FocusMode+

CodeFX

|
1 install
| (0) | Free
Distraction-free coding with smart line dimming, active code block detection, and focus highlighting.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FocusMode+

FocusMode+ is a lightweight VS Code extension by CodeFX that creates a distraction-free coding experience by visually dimming everything outside your active code region. The focus zone follows your cursor in real time, keeping the code you are working on clear while everything else fades away.


Features

Active Line & Smart Dimming

Lines outside a configurable range around the cursor are gradually dimmed. Three brightness levels are applied automatically:

Zone Appearance
Focus band (cursor ± focusRange lines) Full brightness
Near band (half of focusRange further out) Slightly dimmed
Everything else Strongly dimmed

Code Block Detection

FocusMode+ detects the enclosing code block (function, class, loop, conditional) and expands the focus zone to include the entire block. Two detection strategies run automatically:

  1. Bracket matching — finds the nearest enclosing { }, ( ), or [ ] pair.
  2. Indentation heuristics — fallback for Python, YAML, and other indentation-based languages.

Four Focus Styles

Style Effect
Soft Dim Gentle fade — subtle and professional
Spotlight Strong contrast between focus and background
Zen Mode Calm, minimal dimming
Blur Mode Near-invisible background, maximum focus

Status Bar Indicator

A clickable status bar item shows whether FocusMode+ is on or off.

$(eye) FocusMode+ ON    ← click to disable
$(eye-closed) FocusMode+  ← click to enable

Distraction-Free Mode

Optionally hide VS Code chrome while focus mode is active:

  • Minimap
  • Breadcrumbs
  • CodeLens annotations

Settings are saved and restored automatically when focus mode is toggled.

Performance-First Design

  • All updates are event-driven — no timers or polling loops.
  • A 50 ms debounce collapses rapid cursor movements into a single update.
  • Decorations use isWholeLine: true with opacity, avoiding syntax-highlight overrides.
  • No theme configuration files are modified at any time.

Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for:

Command Description
FocusMode+: Toggle Focus Mode Enable or disable focus mode
FocusMode+: Enable Focus Mode Explicitly enable
FocusMode+: Disable Focus Mode Explicitly disable
FocusMode+: Switch Focus Style Pick a dimming style from a quick-pick menu

Settings

All settings are available in the VS Code Settings UI under FocusMode+.

Setting Type Default Description
focusModePlus.enabled boolean false Auto-enable on VS Code startup
focusModePlus.focusRange number 6 Lines above/below cursor kept at full brightness (1–50)
focusModePlus.style string "softDim" Visual style: softDim, spotlight, zenMode, blurMode
focusModePlus.hideMinimap boolean false Hide minimap while active
focusModePlus.hideBreadcrumbs boolean false Hide breadcrumbs while active
focusModePlus.hideCodeLens boolean false Hide CodeLens while active

Example settings.json snippet

{
  "focusModePlus.enabled": false,
  "focusModePlus.focusRange": 8,
  "focusModePlus.style": "spotlight",
  "focusModePlus.hideMinimap": true,
  "focusModePlus.hideBreadcrumbs": false,
  "focusModePlus.hideCodeLens": false
}

How It Works

┌──────────────────────────────────────────┐
│  Line 1   ░░░░ strongly dimmed           │  dimDecoration
│  Line 2   ░░░░ strongly dimmed           │
│  Line 3   ▒▒▒▒ slightly dimmed          │  nearDecoration
│  Line 4   ████ full brightness  ◄ block  │
│  Line 5   ████ full brightness  ◄ cursor │  (no decoration)
│  Line 6   ████ full brightness  ◄ block  │
│  Line 7   ▒▒▒▒ slightly dimmed          │  nearDecoration
│  Line 8   ░░░░ strongly dimmed           │  dimDecoration
└──────────────────────────────────────────┘
  1. On every cursor move, text edit, or editor switch, scheduleUpdate() is called.
  2. A 50 ms debounce fires updateDecorations().
  3. The enclosing bracket block is detected (then indentation as fallback).
  4. Focus/near/dim ranges are computed and applied via TextEditorDecorationType.
  5. The decorations update in place — no flicker, no theme writes.

💡 Feedback

If you encounter issues or have suggestions, feel free to leave us a review.


License

MIT © CodeFX

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft