Grapple
Grapple is a tool that allows you to quickly open VS Code projects using only the keyboard. It is based on the simplicity of PowerToys Run.
Simply use the hotkey to bring Grapple to the foreground, type the name of the project, and press Enter.
How to Use Grapple
To install grapple, first download the source from GitHub and follow the installation instructions there. Once installed, you can register the paths to your projects and the names you want to associate with them in the config/grapple.ini file. The format of that file looks something like this:
[Projects]
projectA = relative/path/to/project
projectB = C:/absolute/path/to/project For each project, the string on the left-hand side of the equal sign is what you will type into the search bar to open the project, and the path to the project goes on the right-hand side.
When grapple.exe is launched, it will sit in the system tray, waiting for the hotkey Ctrl+Shift+Space. When the hotkey is pressed, the search bar will appear, and you can type the name of the project you want to open. After you press Enter, the project should be opened in VS Code.
To set Grapple to launch at startup, create a shortcut to grapple.exe and place it in the %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup folder.
More About the Project
I built Grapple because opening VS Code projects was one of those minor annoyances to me. These were the other options for opening projects, and each of them introduces some amount of friction:
- Opening VS Code and clicking on the project under Recent.
- Involves the mouse, and opening projects from VS Code will not allow using the MSVC compiler.
- Opening VS Code, opening the Command Palette (
Ctrl+Shift+P), and typing the name of the project.- Opening VS Code from the keyboard requires something like PowerToys Run, and there are too many steps.
- Opening File Explorer navigating to the project folder, opening a terminal window, and typing
code .- Involves the mouse, way too many steps, leaves extra windows open.
- Creating Command Prompt shortcuts to navigate to the project folder and type
code .- Litters the desktop with shortcuts, difficult to automatically close the terminal window.
Instead of these methods, I wanted something similar to PowerToys Run, but specifically for opening VS Code projects. I just want to press a hotkey, type in the name, and go. Also, I didn’t want to worry about using the specific Command Prompt that allows using the MSVC compiler from the command line or running vcvarsall.bat. This is definitely one of those cases where you spend much more time automating a task than you would spend on the task to begin with, but it’s more about the user experience. Plus, I thought it would be a good opportunity to challenge myself by using only C and libraries provided by Windows, while learning Direct3D 11 along the way. Because of this limitation, Grapple is currently Windows-only.