Inspired by vim-rooter. AlwaysOpenWorkspace opens a workspace by finding the project root when you open a file.
The project root is identified by:
- being a known directory;
- or the presence of a known directory, such as a VCS directory;
- or the presence of a known file, such as a Rakefile.
Out of the box it knows about git, darcs, mercurial, bazaar, and subversion, but you can configure it to look for anything.
The workspace will not be opened if the file has been associated with any existing workspace.
Be sure to disable "Explorer: Expand Single Folder Workspaces" in the VSCode setting. Otherwise VSCode will open the workspace for you ( AlwaysOpenWorkspace respects VSCode's decision
automatically add folders to the current workspace if there are opened files without corresponding folders. If there are no opened workspaces, a new one will be created.
automatically remove the folder when there are no opened files in it. The last one won't be removed. It can be disabled in the setting.
close the last editor will also close VSCode. default is false, need to enable it in the extension setting
- For nodejs projects, some vscode plugins will open
package.json
andtsconfig.json
automatically. In such a case, the auto-remove feature will fail to function because these files cannot be closed by the user. - Sometimes auto-remove will fail to remove the unused folder. We are waiting for VS Code to support better editor API to solve it.
All logs are shown in Help
->Toggle Developer Tools
by default.
- support open current folder if the pattern "./" is added to "Root Folders" setting (it's not added by default)
- Automatcally close vscode when all editors are closed
- Automatcally remove folder if all files belong to the folder are closed
- Initial release