Alfred Workflow - Open in Visual Studio Code
An Alfred 4 workflow opening files or folders with Visual Studio Code.
Note: Alfred Powerpack is required to use workflows.
Installation
- Download the latest version
- Install the workflow by double-clicking the
.alfredworkflow
file - You can add the workflow to a category, then click "Import" to finish importing. You'll now see the workflow listed in the left sidebar of your Workflows preferences pane.
- Make sure your Alfred workflow environment variables are set correctly
Example Alfred workflow environment variables
cli => /usr/local/bin/code
wds => /Users/nizari91/Development/http/app,/Users/nizari91/Development/http/vue
Usage
Just type code
followed by your search query.
code
Press
to open the directory with your Visual Studio Code.
Change IDE Editor
You can easily change the IDE in which you open the folder by updating the cli
execution path.
For example setting it to /usr/local/bin/subl
will open your directory with Sublime.
Troubleshoot
Nothing happens?
In this case open the Alfred Debugger Utility and see what error is thrown. A common use case can be that your IDE execution file doesn't exist.