What is ContextKeeper?

ContextKeeper is Visual Studio plugins that lets you switch between last opened files (documents sets). Everything is saved to simple JSON files aka snapshots.

Every snapshot saves:

  • logical state
    • your favorites files (non-solution files are also supported)
    • last opened files, order and state, including last selected line & column
    • pinned tabs
  • visual state
    • main IDE window position and size
    • floating windows position and size
    • docked state and horizontal/vertical orientation

The plugin has powerful git integration with automatically restored context when changing branches.

img

ContextKeeper on the Jesse Liberty's podcast

Lately during Yet Another Podcast Show 206, Jesse Liberty asked Mads Kristensen:

Jesse: "What I want in Visual Studio is to be able to say, take a snapshot of everything where I am. All the opened windows, all the breakpoints. All, everything that has to do with my development and let me save it under a name. And then switch, because if I'm in the middle of development, and the bug comes in, I want to be able to save it under my name, switch to what I'm doing. (...) and I'm back in that environment exactly the way I was."

Mads: "Someone wrote this extension like a 6 months ago. What you're asking for - exists. (...). It something about Context (Keeper)". Since May it's on the VS Marketplace and a little easier to find than before 😉

Huge thanks for Mads Kristensen for mentioning the ContextKeeper!

ContextKeeper v1.8 release and relative paths

I'm really proud 🎉🎉🎉 to announce that support for relative paths is finally implemented in the version 1.8. Relative paths support is part of the 2022 Roadmap and major milestone. The feature was one of the missing puzzle pieces, that I always wanted to include.

Adding support for relative path is essential part to allow sharing your context between different dev environments and also inside your team. It will unlock potential to e. g.:

  • switching between laptop and workstation
  • faster onboarding developers to new tasks, taking over responsibilities
  • sharing mental models of the project across team members
  • fixing complex bugs easier, using targeted mental snapshots

Every time a new snapshot is created it will include RelativePath property for every entry in a *.ck file. When a snapshot is restored, relative paths will be used by default. There is still FilePath property used, as a fallback strategy, for global files. All different types of files are supported including:

  • solution and projects files
  • "loose" files (not included in a solution/project) but still part of the folders structure
  • global files (relative paths cannot be created for them, absolute paths are used)

RelativePath

Current limitations:

  • Full Restore works the best when when switching between the same or similar monitors setup (laptop/dev machine), when monitor's size and resolutions are different than the original snapshot please use:
  • Restore Files which is using the current active window (main IDE or floating window) to restore all files from a snapshot
  • machine-independent snapshots restore process is not implemented yet but it's part of the 2022 Roadmap

Learn more

The latest news and releases are announced at the ContextKeeper's blog. You could also join the Beta program and get latest updates via newsletter.