DEV Community

Cover image for Adding 'Open in Visual Studio Code' to Your Mac's Right-Click Action Menu
Rafa Rafael
Rafa Rafael

Posted on

2

Adding 'Open in Visual Studio Code' to Your Mac's Right-Click Action Menu

As an Ubuntu user, I had grown accustomed to the convenience of opening a project folder in VS Code with a simple right-click. When I transitioned to Mac, I was initially surprised to find that this handy feature wasn't readily available.

However, I was pleased to discover that I could recreate this functionality by leveraging the capabilities of Mac's Automator. This nifty tool allowed me to integrate the right-click functionality to open folders in VS Code seamlessly, effectively tailoring the Mac experience to match my workflow preferences.

Should you wish to embark on this small but mighty quest to bestow upon your Mac the almighty power of 'right-click to open with VS Code', here's the enchanted scroll of instructions I followed:

  1. Open Automator.
  2. Choose Quick Action.
  3. Under Library select Files...olders (Files or Folders).
  4. In the next column select Open Finder Items.
  5. In Workflow receive current field change the value to Automatic (files or folders) if not set.
  6. And at in field select Finder in the dropdown.
  7. Then under Open Finder Items select Visual Studio Code in the dropdown. If Visual Studio Code doesn't appear in the list, choose Other. You can then locate and select it from the file browser dialog that appears.

Mac Automator

If your screen is a mirror image of the one above, it's time to perform the sacred keystroke combo: press Cmd+S to seal the deal with a save. Congratulations, you're now a click away from opening files or folders with the ease of a seasoned Mac whisperer, just like shown below.:

Context menu

Enjoy!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (1)

Collapse
 
xwchristina profile image
XWChristina

That's very helpful. Thank you! I encountered a similar challenge when switching to macOS. Unlike your experience, I used iBoysoft MagicMenu to right-click to quickly open files with VS Code. This utility comes equipped with a Launch With extension, enabling me to directly open the target file or folder with any installed code editor on Mac, including VSCode, iTerm2, Warp, TextEdit, Terminal, Sublime Text, JetBrains Apps, Cursor, CodeRunner, HexEdit, BBEdit, and Atom.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay