Skip to content

ContextKeeper helps you save and restore your editor layout and open files in VS Code.

License

Notifications You must be signed in to change notification settings

muzfr7/ContextKeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContextKeeper

ContextKeeper helps you save and restore your editor layout and open files in VS Code.

Features

  • Save current editor state as a named "Context".
  • Restore contexts at any time.
  • Manage contexts via a dedicated Side Bar view.
  • Supports multiple tab groups and splits.

Limitations

  • Split Layouts: While the extension restores files into their respective groups, the exact "grid" layout (e.g. horizontal vs vertical split direction) is determined by VS Code's default behavior during restoration and may not perfectly match the saved state.
  • Cursor Position: Cursor position and active selection are restored for the active file in each group.

Storage Location

Contexts are stored in VS Code's Extension Global State.

  • This is a persistent storage area managed by VS Code (typically a localized SQLite/JSON DB in your user data directory).
  • Contexts persist across VS Code updates and system reboots.
  • They are not checked into your project's git repository.

Installation & Usage

Installing

  1. From Source:
    • Clone repo, run npm install, then npm run compile.
    • Package into VSIX: npx @vscode/vsce package.
    • Install in VS Code: Extensions View -> ... -> Install from VSIX....

Project Links

Usage

  1. Save Context:
    • Open ContextKeeper in the Activity Bar (Sidebar).
    • Click the Save Context icon (or run command ContextKeeper: Save Context).
    • Give it a name. It is now saved.
  2. Restore Context:
    • Click on any context in the Sidebar list.
    • Note: This effectively closes current tabs and re-opens the saved layout.
  3. Manage:
    • Rename: Click the pencil icon on a context item.
    • Delete: Click the trash icon on a context item.

Development

To set up this extension for development:

  1. Clone the repository.

  2. Install dependencies:

    npm install
  3. Compile:

    npm run compile
  4. Run: Open the project in VS Code and press F5 (or run "Debug: Start Debugging"). This will open a new Extension Development Host window with the extension loaded.

  5. Test:

    npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

ContextKeeper helps you save and restore your editor layout and open files in VS Code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published