Capture beautiful, high-fidelity code screenshots directly from VS Code. 🚀 It renders your code inside a professional A4-style layout with accurate line numbers and real-time updates.
✨ Features
Professional A4 Layout: Renders code on a clean, white A4 sheet style background.
Real-Time Preview: The preview updates instantly as you change your selection or edit your code (debounced for performance).
Accurate Line Numbers: Maintains actual file line numbers in the screenshot.
Syntax Highlighting: Powered by Shiki, ensuring your code looks exactly as it does in your editor.
High-Quality Export: Generates high-DPI PNG screenshots suitable for documentation, blog posts, or social media.
Lightweight & Native: Runs entirely inside VS Code with minimal resource usage.
🚀 How to Use
1. Capture via Context Menu
Select the code you want to capture in any editor.
Right-click and select Capture Code Screenshot.
A preview panel will open in a split view.
2. Keyboard Shortcut
Select your code.
Press Ctrl + Alt + J (Windows/Linux) or Cmd + Alt + J (macOS).
3. Save or Copy
Use the Save as PNG button to save the screenshot using the native VS Code save dialog.
The preview renders with a 2x pixel ratio for crisp quality.
🛠️ Manual Installation
If you have a .vsix file and want to install it manually:
1. Build the VSIX
If you are building from source, first run:
npm run package
This will generate a codeshot-X.X.X.vsix file in the root directory.
2. Install in VS Code
Method A (Command Palette): Press Ctrl+Shift+P, type Install from VSIX, and select the generated file.
Method B (Extensions View): Open the Extensions view (Ctrl+Shift+X), click the ... (Views and More Actions) menu in the top-right corner, and select Install from VSIX....