Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Combine with ContextNew to Visual Studio Code? Get it now.
Combine with Context

Combine with Context

Mohesu

|
46 installs
| (2) | Free
Export project code context in clean Markdown for LLMs. Maps languages, filters files, supports .gitignore and history.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 Combine with Context

A robust, feature-rich way to export code context to a markdown file (paste.md) or zip file (context.zip) for AI/LLM workflows, with advanced filtering, .gitignore support, history/undo, file tree/analysis, content compression, symlink handling, and full customization.

Now available for both VS Code and JetBrains IDEs!


📑 Table of Contents

  • 🎯 IDE Support
  • ✨ Features
  • 🛠 Usage
  • ⚙️ Configuration (settings)
  • ⌨️ Keybindings
  • 🐞 Troubleshooting
  • 🤝 Contributing
  • 📜 License

🎯 IDE Support

VS Code Extension: Available on the VS Code Marketplace

JetBrains Plugin: Support for IntelliJ IDEA, WebStorm, PyCharm, Android Studio, CLion, PhpStorm, RubyMine, GoLand, Rider, and more!

  • Source code available in the jetbrains-plugin/ directory
  • Full feature parity with VS Code extension
  • Native IDE integration with context menus and keyboard shortcuts

✨ Features

  • Instantly copy selected code and context to the clipboard for quick sharing or use.

  • Save selections directly as Markdown files for documentation or collaboration.

  • Export chosen files and folders as a ZIP archive for easy transfer or backup.

  • Effortlessly resave your last selection, streamlining repeated workflows.

  • Supports advanced filtering (e.g., .gitignore, binary/image exclusion) for clean outputs.

  • Handles large projects efficiently with progress notifications and error handling.

  • 🆕 Enhanced Menu Placement: Context menus now appear near copy/paste areas in both VS Code and JetBrains IDEs for better accessibility.

  • 🆕 Visual Icons: All commands now have intuitive icons for better recognition.

  • 🆕 Smart Confirmations: Automatic confirmation dialogs for large operations to prevent accidental processing.

  • 🆕 Improved Performance: Optimized file checking to avoid expensive operations during UI updates.

  • 🆕 Better Accessibility: Keyboard shortcuts now work globally in VS Code, not just in explorer view.

  • Designed for reliability, traceability, and ease of use in production environments.

  • Multi-select: Select any files and/or folders in VS Code Explorer.

  • Re-save/Update last output: Once you've created a paste file or ZIP archive, you can regenerate it later using the same selection without reselecting files. A single Update last output command determines which format to rebuild based on your most recent save.

  • LLM-friendly Markdown: Each file block is clearly marked (with path, code block, timestamp); optional file tree and type-wise analysis.

  • Smart filtering: Excludes binary files, images, large/empty files, and recognizes .gitignore. If you explicitly select a file or folder, it will be processed even if its parent directory is ignored by .gitignore. Recognized file types (via the Markdown mapping) are always included.

  • Content compression: Minifies code (trim whitespace, remove comments for JS/TS, Python, CSS) when enabled.

  • Symlink handling: Configurable to skip or resolve symlinks.

  • User configuration: Change output file, folder, append/overwrite, excludes, separators, etc., via settings.

  • One-click undo: Restore a previous paste or ZIP file from history.

  • Clipboard mode: Optionally copy context directly to clipboard.

  • Progress & warnings: Notifies if selection is very large (lots of files or total MBs).

  • Output channel logging: For debugging and traceability.

  • Production-ready: Handles errors, permissions, and race conditions robustly.


🛠 Usage

  1. Select files/folders in the VS Code Explorer.
  2. Right‑click and choose Save As → Save to paste file or Save As → Save selection as ZIP. The selected files will be aggregated and saved to your configured Markdown (paste.md by default) or ZIP (context.zip by default) file.
  3. The output will appear in the designated file (or your chosen name/folder).
  4. Undo: Use the CC: Undo last save command to restore the most recent backup of your paste or ZIP file.
  5. Clipboard: Use the CC: Copy to Clipboard command/menu to copy the formatted context directly.
  6. Update: After you've saved a paste or ZIP once, you can regenerate the output with the latest contents of the same files/folders. Right‑click and choose CC: Update last output; the extension will determine which format to regenerate based on your most recent save.

📝 Note: The same functionality is available in JetBrains IDEs (IntelliJ IDEA 2023.2+, WebStorm 2023.2+, PyCharm 2023.2+, etc.) via the JetBrains plugin located in the jetbrains-plugin/ directory. The plugin supports all IntelliJ Platform-based IDEs from version 2023.2 through 2024.3.


⚙️ Configuration (settings)

Set these in your workspace or global settings:

Setting Default Description
outputFileName "paste.md" Name/path for output file
appendMode false Append or overwrite
includeTimestamp true Add timestamp to each file block
filteredExtensions .png, .exe etc. Array of extensions to skip
maxFileSize 5242880 (5MB) Per-file max size
outputSubfolder "" (root) Subfolder for output (optional)
openAfterSave true Open file after writing
separator "\n---\n" Markdown separator between file blocks
useGitignore true Use .gitignore for filtering
historyFolder .llm-context-history History folder for backups
includeFileTree true Include file tree in output
includeFileAnalysis true Include file count/type analysis
symlinkHandling "skip" Handle symlinks: "skip" or "resolve"
compressContent false Minify content and remove comments

⌨️ Keybindings

  • Copy to clipboard: Ctrl+Alt+Shift+C
  • Save to paste.md: Ctrl+Alt+Shift+P
  • Save to context.zip: Ctrl+Alt+Shift+O
  • Undo last save: Ctrl+Alt+Shift+Z
  • Update/Resave Output: Ctrl+Alt+Shift+U

🐞 Troubleshooting

  • If no files appear: Check filteredExtensions, .gitignore, file size limits, or empty files.
  • If output isn't updated: Confirm permissions and path.
  • For debugging: Run the "CC: Show Log" command to see output logs.

🤝 Contributing

  1. Fork + branch.
  2. Run/test via F5 in VS Code.
  3. PRs welcome; see file header comments and outputChannel logs for tracing/debug.

📜 License

MIT License

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