Skip to content

winterdrive/vscode-virtual-tabs

Repository files navigation

VirtualTabs – VS Code Extension for Virtual Tabs & Custom File Grouping

Visual Studio Marketplace Version Installs Rating AI-Ready Context

繁體中文

VirtualTabs - VS Code File Grouping and AI Context Extension


🚀 What is VirtualTabs?

VirtualTabs is a VS Code extension that provides custom "Virtual File Directories" outside of your native file system. Unlike standard directories, VirtualTabs helps you create independent logical file groups based on your current development theme, while also providing AI-Ready Coding Context for quick copying. It is perfectly suited for Monorepo projects or large-scale applications using MVVM or MVC architectures.


⚡ VirtualTabs vs. Native VS Code Tabs

Feature Native VS Code Tabs VirtualTabs Extension
Persistence Cleared on session close Saved permanently per workspace
Grouping Folder-based only Logic-based (Cross-directory support)
AI Context Hard to gather manually One-click context generation for LLMs

VirtualTabs vs Physical File System

🧩 Solving Modern Workflow Pain Points

In MVC/MVVM or large-scale projects, related files are often scattered across deep directory structures, making switching a repetitive chore:

❌ Traditional File Structure:
├── config.json          (Root Config)
├── styles/theme.css     (Style Layer)
├── src/components/      (View Layer)
├── tests/__tests__/     (Testing Layer)

✅ Theme-Based Virtual Directory:
📁 Feature: Theme System
  ├── 📁📚 Configuration
  │   └── config.json
  ├── 📁📚 Style Definitions
  │   └── theme.css
  ├── 📁📚 Components (View Layer)
  │   └── ThemeProvider.tsx
  │     └── 🔖 Line 45: Context setup
  └── 📁📚 Unit Tests (Logic/Testing)
  │   └── theme.test.ts

🚀 Quick Start

Installation

  1. Open VS Code.
  2. Press Ctrl+Shift+X (or Cmd+Shift+X).
  3. Search for VirtualTabs and click Install.

First Time Setup

  1. Click the VirtualTabs icon in the Activity Bar (left sidebar).
  2. Right-click in the panel → Create New Group.
  3. Drag files from Explorer into your group.

✨ Key Features

📁 Core Capabilities

  • Cross-Directory Grouping — Organize files from anywhere, breaking free from folder constraints.
  • Task-Oriented Bookmarks — Mark specific lines of code within your groups for quick navigation.
  • Sub-Groups & Nesting — Create hierarchical structures for better organization.
  • AI Context Export — One-click copy all files as LLM-ready context.
  • Portable Config — Settings saved to .vscode/virtualTab.json for team sharing.
  • AI Agent Integration (MCP) — Connect AI agents (Cursor, Claude, etc.) to manage groups programmatically.
  • Auto Reveal & Sync — Automatically focus active files and sync with native editor groups.
  • Send to... — Quickly send selected files or groups to pre-configured destinations.
  • File Reordering — Custom manual ordering via Drag & Drop or keyboard shortcuts.

⚡ Workflow Boosters

  • Smart Copy Menu — Unified copy options for names, paths, and total file content.
  • Directory Drag & Drop — Drag folders to add all files recursively.
  • Clipboard Operations — Full Cut/Copy/Paste support for files and groups.
  • Smart Organization — Auto-group by extension, date, or sort by various criteria.

📖 User Guide

📁 Group Management

  • Create/Rename: Right-click panel or groups to manage.
  • Sub-Groups: Right-click a group → Add Sub-Group (or drag one group into another).
  • Auto-Sync: The built-in "Open Editors" group automatically tracks your native tabs.
  • Drag & Drop:
    • Files: Drag files from Explorer into groups.
    • Folders: Drag folders to recursively add all files inside.
    • Multi-select: Hold Ctrl/Cmd to drag multiple files at once.

Drag and Drop Demo

🔖 Task-Oriented Bookmarks

  1. Right-click any line of codeAdd Bookmark to VirtualTabs.
  2. The bookmark appears nested under the file in your group.
  3. Click to jump instantly to that exact line.
  4. Edit label/description to document why this line is important.

Bookmarks Feature

🤖 AI Context Export

The "Killer Feature" for LLM workflows.

  1. Setup a group with all relevant files for your current task.
  2. Right-click the group → Copy...Copy Context for AI.
  3. Paste into ChatGPT/Claude.
    • Smart: Binary files are skipped; large files (>50KB) are flagged for review.
    • Clean: All code is formatted in markdown blocks with file paths.

AI Context Demo


🤖 Smart AI Agent Integration (MCP)

VirtualTabs provides full AI agent integration via the Model Context Protocol (MCP). Let your AI assistant (Cursor, Antigravity, Kiro, etc.) manage your workspace groups programmatically.

  • 🔌 Standardized Tools: Exposes 15+ tools for creating groups and explore the project.

  • 🛡️ Safety Mode: Features a four-layer safety decision tree to prevent unintended disk changes.

    Safety Decision Tree

  • ⚙️ Easy Config: Use the MCP Config Panel (command: VirtualTabs: Show MCP Config) to get ready-to-paste settings.

👉 See the MCP Setup Guide for detailed IDE configuration.


💡 Best Practices

  1. Group by Task, Not Folder: Think about the feature you're working on.
  2. Use Bookmarks for Logic Flow: Mark key decision points in your code.
  3. Curate AI Context: Group only necessary files (5-10) to maximize LLM accuracy and reduce token noise.
  4. Share with Team: Commit .vscode/virtualTab.json to share curated project views.

❓ FAQ

Q: I don't see the VirtualTabs panel?
Check if the extension is enabled and if you are using VS Code 1.75+. Look for the VirtualTabs icon in the Activity Bar.

Q: How does "Copy Context for AI" work?
It reads all files in the group, formats them as markdown code blocks, and copies them to the clipboard.

Q: Can I reorder groups manually?
Yes, right-click any group and use the Move Up/Down commands.


🤝 Contributing

We welcome community contributions! Please check DEVELOPMENT.md for environment setup and debugging guides.


🔥 Recommended Companion

🔥 Quick Prompt

The perfect partner for VirtualTabs.

While VirtualTabs organizes your Context (Files), Quick Prompt organizes your Instructions (Prompts).

  • VirtualTabs: Defines where the AI should look (File Groups).
  • Quick Prompt: Defines what the AI should do (Prompt Management).

Together, they create the ultimate AI-coding workflow.

Get Quick Prompt on VS Code Marketplace | Open VSX Registry


📅 Changelog

👉 See CHANGELOG.md for full release history.


❤️ Support

If you find this extension helpful, please consider supporting the development!

ko-fi

License: MIT

Organize smarter, code faster. 🚀

About

Organize files into persistent, cross-directory virtual groups for better navigation and AI context in VS Code.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors