Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cap StateNew to Visual Studio Code? Get it now.
Cap State

Cap State

Codigo Foundry

|
1 install
| (0) | Free
Micro version history for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CapState: Semantic Micro-History

Stop fighting with Undo/Redo. Start performing surgery on your code.

CapState is a high-precision version history tool that understands your code's structure. Unlike standard history tools that track entire files, CapState uses Tree-sitter to track individual functions, classes, imports, and variables.

It provides a "Time Machine" for every component in your codebase, allowing you to revert specific functions to their past states without losing the work you've done elsewhere in the same file.


🚀 Features

🧠 Semantic Awareness

CapState tracks logical code blocks, not just lines:

  • Functions & Methods (JavaScript, TypeScript, Python, Dart, etc.)
  • Classes & Widgets (including Flutter)
  • Top-level Variables & Models
  • Global Imports

🛠️ Surgery Tool (Targeted Diff)

  • Side-by-side comparison of past vs current code
  • Use native VS Code diff controls to move lines
  • Saving applies changes only to the selected block

⏱️ Smart Savepoints

  • Configurable interval (5–30 minutes)
  • Ignores whitespace-only changes
  • Saves last valid (parsable) state during refactors

🖱️ CodeLens Actions

Inside functions:

  • Revert to previous state
  • Search history of that block

📌 History Management

  • Pin important savepoints
  • Sliding window of recent history
  • Rename savepoints inline

⌨️ Keyboard Shortcuts

  • Force Save: Cmd+Alt+S / Ctrl+Alt+S
  • Open History: Cmd+Alt+H / Ctrl+Alt+H
  • Revert Block: Cmd+Alt+R / Ctrl+Alt+R

🌍 Supported Languages

  • Web: TypeScript, JavaScript, TSX, JSX, CSS, HTML, PHP
  • Mobile: Dart, Flutter, Swift, Kotlin
  • Backend: Python, Go, Rust, Java, C++, C#, SQL

🛠 How It Works

CapState uses WebAssembly-based Tree-sitter parsers to build a syntax tree of your code. Each component gets a stable semantic identity, so moving code within a file does not break its history.


📝 Usage

  1. Open a supported file
  2. Click inside a function to access actions
  3. Use the sidebar to browse history
  4. Right-click savepoints for more options

⚠️ Requirements

  • Visual Studio Code 1.100.0 or higher

🐞 Known Issues

  • Large files may have slight indexing delay
  • Some edge-case syntax may not parse correctly

📦 Release Notes

See CHANGELOG.md


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