An Alfred 4 workflow opening files or folders with Visual Studio Code.
Note: Alfred Powerpack is required to use workflows.
- 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
cli => /usr/local/bin/code
wds => /Users/nizari91/Development/http/app,/Users/nizari91/Development/http/vue
Just type code
followed by your search query.
code <query>
Press <enter>
to open the directory with your Visual Studio Code.
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.
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.