How to quickly open folder in Visual Studio Code and other applications in macOS?

How to quickly open folder in Visual Studio Code and other applications in macOS?

January 24, 2022·Damian Krawczyk
Damian Krawczyk
·
Updated on
·

Automation

·

Apple Automator

In this note, you will read how to use Automator in macOS to speed up some of your activities. It makes it easier for me to get around macOS every day.

ℹ️
You can find an extended version of this note with a detailed description at ITincor.com

Open in Visual Studio Code

  1. Open Automator.
  2. Go to File > New.
  3. Choose Quick Action.
  4. Change Workflow Receives current to files or folders in Finder.app.
  5. Add a Run Shell Script action by drag and drop.
  6. Change Pass input to as arguments.
  7. Copy and paste the following in the shell script box:
    for f in "$@"
    do
        open -n -b "com.microsoft.VSCode" --args "$f"
    done
  8. Go to File > Save and save it as e.g. Open in Visual Studio Code.
  9. Go to Finder.
  10. Click RMB (right mouse button) on folder or file.
  11. Choose from menu Quick Actions > Open in Visual Studio Code.
ℹ️
If you have Path Bar enabled in Finder (alt⌥cmd⌘ P) and you want to use this Quick Action also in Path Bar, click RMB (right mouse button) on folder or file in Path Bar and choose from context menu Services > Open in Visual Studio Code.

Open in Visual Studio Code, based on jnovack post @ stackoverflow.com CC BY-SA 4.0

Open in pyCharm

  1. Open Automator.
  2. Go to File > New.
  3. Choose Quick Action.
  4. Change Workflow Receives current to files or folders in Finder.app.
  5. Add a Run Shell Script action by drag and drop.
  6. Change Pass input to as arguments.
  7. Copy and paste the following code to action Run Shell Script:
    for f in "$@"
    do
        open -n -b "com.jetbrains.pycharm.ce" --args "$f"
    done
  8. Go to File > Save and save it as e.g. Open in PyCharm.
  9. Go to Finder.
  10. Click RMB (right mouse button) on folder or file.
  11. Choose from menu Quick Actions > Open in PyCharm.
ℹ️
If you have Path Bar enabled in Finder (alt⌥cmd⌘ P) and you want to use this Quick Action from Path Bar, click RMB (right mouse button) on folder or file in Path Bar and choose from menu Services > Open in PyCharm.