When using Caleb's extension, I found myself organising repositories on my local computer in one big repositories
folder like this:
repositories
├── tandahq-work-samples
├── tandahq-api-v2-code-samples
├── mitchbne-simple-project-switcher
└── mitchbne-wabbit
While this is reasonably neat, my repositories
directory grew to around 60 folders - so I decided to cleanup my folder structure so that it looked like this:
github.com
├── TandaHQ
│ ├── work-samples
│ └── api-v2-code-samples
└── mitchbne
├── simple-project-switcher
└── wabbit
Pre-fork, the VS Code extension would look at the current directory's parent, and grab a list of all child directories. This means that when I'm in github.com/mitchbne/wabbit
, I would have no access to any of the repositories under github.com/TandaHQ
.
Before
{
"simple-project-switcher.directory": "~/repositories"
}
After
{
"simple-project-switcher.projectDirectories": [
"~/github.com/mitchbne",
"~/github.com/TandaHQ"
]
}
Simple Project Switcher aims to provide for projects the same "switching" experience that Cmd+P provides for files.
This extension is private and not publicly available on VS Code's extension marketplace.
To install the extension, search for and select Extensions: Install from VSIX...
from VS Code's command palette (Cmd+Shift+P).
- From within a project in VS Code, press Cmd+; (or Ctrl+; on Windows)
- A "Quick Switcher" dialogue will pop up with a list of all the folders in your current project's parent directory
- Search for a project, and press Enter
- While holding Cmd, press the
;
key twice to switch the most recently accessed project - Repeat the above sequence to switch back
By default, this extension uses the parent directory of the current project for the project list.
You can customize this behavior by setting an explicit projects directory in your settings.json
file:
{
"simple-project-switcher.directory": "/Users/calebporzio/Sites",
}