Escape Buster is a VS Code extension that provides a convenient way to preview strings containing escape sequences like \n, \t, and \r. It's especially useful when working with code or formatted data stored as strings in JSON files, source code, and other formats.
Features
Preview on Hover: Instantly see the expanded content of strings with escape sequences when hovering over them
Dedicated Preview Panel: Open strings in a full preview panel for better viewing and interaction
Syntax Highlighting: Automatic language detection and syntax highlighting for code snippets
Theme Compatibility: Consistent syntax highlighting in both light and dark themes
Copy to Clipboard: Easily copy the expanded content with a single click
Multi-line Editor: Edit escaped strings in a dedicated editor with automatic conversion to/from escape sequences
Double Escape Sequence Support: Handle double escape sequences like \\n, \\t, and \\r
Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
Search for "Escape Buster"
Click Install
Usage
Open a file containing strings with escape sequences (e.g., a JSON file)
Hover over a string that contains escape sequences like \n, \t, or \r
A preview will appear showing the formatted content with escape sequences interpreted
Click "Open in Preview Panel" to open a larger, dedicated view
Use the "Copy to Clipboard" button to copy the expanded content
Supported Escape Sequences
\n - New line
\t - Tab
\r - Carriage return
\" - Double quote
\' - Single quote
\/ - Forward slash
\\ - Backslash
Configuration
EscapeBuster can be configured through the VS Code settings:
escapeBuster.enabledFileTypes: Array of file extensions where the extension should be active (default: ["json"])
escapeBuster.hoverDelay: Delay in milliseconds before showing the preview (default: 100)
escapeBuster.enableDoubleEscape: Enable/disable support for double escape sequences (default: false)