Standard Python formatters (like Black or Autopep8) fail when code has indentation errors. They can't format what they can't parse.
Python Indentation Healer fixes the broken structure first, allowing you to copy code from PDFs, blogs, or messy forums and paste it directly into VS Code without breaking your workflow.
See it in Action
1. Smart Paste (Ctrl + V)
Automatically detects logic flows and fixes indentation the moment you paste.
2. Manual Heal (Ctrl + Alt + I)
Have an old file with broken indentation? Fix it instantly.
Key Features
Context-Aware Engine (v3)
Uses "Look-Back" logic to find the correct parent for else, except, and finally blocks.
Handles deep nesting and complex class structures that flat-line formatters miss.
Smart Paste Integration
Intercepts Ctrl+V in Python files to apply fixes on the fly.
Works silently in the background.
"Boss Fight" Tested
Verified against complex nested loops, context managers (with open), and mixed indentation styles.
How to Use
Goal
Action
Fix on Paste
Just press Ctrl + V inside any .py file.
Fix Selection
Highlight code and press Ctrl + Alt + I (Mac: Cmd + Alt + I).
Command Palette
Press Ctrl + Shift + P and search for "Heal Python".
Release Notes
1.0.0 (The Ultimate Release)
Ghost Tracker: Indentation logic now survives blank lines by remembering context.
Return Escape: return statements now correctly snap out to the function level, preventing "None Type" and "Dead Code" errors.
Data Structure Support: Added support for multi-line lists, sets, and dictionaries (indentation based on brackets [], {}, ()).
Section Header Snapping: Powerful new heuristic for aligning major print/log statements in complex scripts.