Code Monkey home page Code Monkey logo

virtualworkspace's Introduction

Virtual Workspace

This extension allows you to save all the opened editors into a file, that can be restored later.

Usage

  1. Open a bunch of files from different locations (not under the same folder possibly... for that use native Workspaces instead) within a VSCode instance
    1. You could also create a new file on the fly and type something in it, without save
  2. Run VirtualWorkspace: Save Workspace As...
  3. Close VSCode
  4. Open a folder with VSCode
  5. Close VSCode
  6. Double click the file saved in step (2)
    1. Or select VirtualWorkspace: Restore from the command palette
  7. Select the files that you want to restore from the list saved in step (2)
    1. Or just hit Enter to load them all !

Settings

  • virtualWorkspace.remember_last_open_dialog_location : when enabled, your save & restore commands will re-open in the last opened location
  • virtualWorkspace.override_open_dialog_location: if set, your save & restore commands will always be open in this location

Tips

  • virtualWorkspace.saveAs and virtualWorkspace.restore can accept a location path argument which will override the settings and will open the dialog in this folder

Known Issues

VSCode, at the time this extension was created, didn't provide good support for working with open editors from extension API, so there are some limitations:

  1. It Works only with text editors and file not on disk
  2. There is no access to the grid layout system used, so when you save complex layout only column position can be recorded
  3. When there are multiple non writable editors opened, it seems that VSCode keep only 7 files reachable from the extension, so I added a mechanism that try to cycle more times. If it doesn't succeed in scanning all the files, try the following:
    1. if you read in the bottom "Saving virtual space..." and it looks like the process is pending, just click on any tab to resume the save process
    2. when you read, for example, "Save list of 7 file..." and you have 10 files, just add the three focusing them first and then replying with 'Add active file' for each of them
  4. Don't keep track of changes made in files saved on disk

virtualworkspace's People

Contributors

volcanicbytes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

virtualworkspace's Issues

Remember Save and Restore paths?

Hi

This is isn't an actual bug, but a request for an enhancement that would make the extension more user-friendly.

When saving a workspace, or restoring one, the file dialog defaults to the path of the currently open editor. I like saving my virtual workspace files in a single location, so it can be annoying having to navigate to that location every time via the file dialog (or having to first edit a file in that location before running the desired command).

Would it be possible to either

  • update the file dialogs, or
  • add a setting, or
  • update the restore & save commands to take an optional path argument

so the most recently used save/restore directory is remembered or may be supplied on-the-go as the command is invoked?

My system details:

  • Debian 10.9
  • Linux kernel 4.19.0-16-amd64
  • VSCode ver. 1.56.2
  • Virtual Workspace ver. 0.0.2

Thanks

Cancelled Restore removes all open editors

Hi, I have noticed the following undesirable behavior:

  1. Open some files in VS-Code (it may also be an existing virtual workspace).
  2. Run the virtualWorkspace.Restore command.
  3. Click Cancel on the Restore File Dialog window.
  4. All open editors have been closed after this (I can actually see the editors closing in the background as the Dialog Window comes up).

The behavior I'd expect would be that a cancelled restore should preserve the currently opened editors.

My system details:

  • Debian 10.9
  • Linux kernel 4.19.0-16-amd64
  • VSCode ver. 1.56.2
  • Virtual Workspace ver. 0.0.2

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.