VSCode - Remember Open Files
vscrof gives you the power to Save and Restore sets of files (editors) saved in JSON formatted files you own.
This extension helps you get around 2 main problems while adding some great benefits described below these points:
- Not being able to store, close and restore open editors at will.
- Not being able to easily access the entire set of open editors using the VSCode API.
See limitation expressed here: https://github.com/microsoft/vscode/issues/15178
Why you need this extension:
The mental overhead of switching between different sets of files during work can be great. This can send you on a time consuming file-hunt, especially when you do complex projects involving many different files in different locations within the same code repository. This extension helps you with this in a simple way.
As you get different work requests you can now "remember" the open files (editors) you were working on! This is done by using Storage Files and made available to you in JSON format.
You can finally free attention from files you were looking at when changing gears to work on something disrelated! Yes, save your mental clipboard into a text file and own it! :o)
You can close all the editors you had open, open up another set of editors, work on them and after you are done, close them and reopen the previous set of editors. This is done using a few simple steps.
Main Benefits
- Organize your work your way! By context, feature, project scope or however you work.
- Save the Storage Files to your repository and allow other developers to use them too! They can see which files relate to parts of your code base and where to find what you were working.
- Enjoy a clean workspace no matter how random requests may become.
- Breathe easily knowing you can work on any device anywhere and continue where you left off. Yes, VSCode only cache per device right now and this may never change. With this extension you can become a device nomad while being more organized about your work.
- You can also use the data generated by this extension to help you with documentation covering produced files or scope of change.
Basic Features
- Automatically creates a ".vscrof" directory in your project root.
- Saves data in a JSON formatted "Storage File" containing file paths.
- Uses a macro-like "click to select" style when specifying the editors (open file tabs) to store.
- Restore (open) editors from any "Storage File" located in the ".vscrof" directory of your project root path.
- Allow you to switch between different Machines or Operating Systems (Windows / Linux) and restore sets of editors you had open before.
Command Palette
Open the command palette. You may need to type <) vscrof:
to see available options listed below:
Command Usage & Descriptions
<) vscrof: Initialize (Specific Editor) - Step 1 (Option A)
- Select this when you are ready to start saving your open editors.
- The editor you have in focus will be used as the first entry into the storage file.
- The status bar icon will indicate the number of editors you cliked for storage.
<) vscrof: Initialize (All Touched Editors) - Step 1 (Option B)
- Same as Option A, but automatically adds all editors that were touched during the session.
- Be sure to click any editors you want in your storage file that were not touched.
- Please Note:
Editors appearing on the tab bar that were never clicked after launching VSCode will not be saved.
<) vscrof: Save Storage File - Step 2
- This saves the storage file to the
.vscrof
directory on your workspace root.
- The file name can be specified during the process with a default value configurable in the extension settings.
<) vscrof: Restore Editors
- Lists all .JSON storage files located in the
.vscrof
directory.
- Opens all files specified in the selected Storage File.
<) vscrof: Show Storage Path
- Shows the user the detected Storage File root and default name so you can see where files will be saved.
Narrated Example:
- You're busy working on a new component named "Lake Pleasant" which is part of the "New Forest" project.
- You get a request to work on a component named "Water Bucket", so you save your open files (editors) for "Lake Pleasant" using the
vscrof
extension.
- You have an existing vscrof
Storage File
for the "Water Bucket" component and re-open the files you had open when you worked on it last.
- After completing the work, you close the files, commit your work and return to working on "Lake Pleasant" by restoring its files using
vscrof
.
Requirements
None.
Extension Settings
This extension contributes the following settings:
vscrof.verbose
:
set to true
to output information using console.log().
vscrof.veryVerbose
:
set to true
to output more information such as object structures using console.log().
vscrof.filesFormat
:
Used for file entry format with integer based index keys in Object or Array styles.
vscrof.storageFileTitle
:
Sets the title used for the Storage File.
vscrof.storageFileName
:
Sets the name of the storage file containing all your goodies.
vscrof.directorySeparator
:
Used for Linux / Windows file path parsing.
Known Issues
- Only works with text-based files, not image files that render a preview.
- Remote files not tested.
Your Feedback is Welcome
Questions & Answers
Feedback or Suggestions
Sincerely,
Stephen Nortje
Dunde Lunar LLC